Skip Navigation

[Resolved] Shortcode within shortcode problem

This support ticket is created 7 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by Minesh 7 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#402582
screenshot2.jpg
screenshot1.jpg

I have two custom post types:

Companies
Requests

Each Company has a custom field with a unique id that is manually created in the admin area (example: 47GH32).

I have created a view that displays the company logo via URL variable (this works great) OR a shortcode attribute. (see screenshot1.jpg. I like to use single letters to keep things simple). This view is called “clogo" (short for company logo).

Each Request has a custom field for a Company and in that field is one of the unique IDs matching one of the companies (example: 47GH32).

I have a view which displays the request and in the loop output I have this line:

[wpv-view name="clogo" c='[types field="requestcompany"][/types]']

See screenshot2.jpg.

I am trying to get the custom id for the company to populate into that shortcode and display the logo.

However on the front end that just display a “No items found”… what am I doing wrong?

I followed your tutorial on shortcodes within shortcodes to get this far.

#402614

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

By design, it should work. There should not be any issue using this.

Could you please share problem URL?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#402797

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Actually - "requestcompany" field belongs to post and view "clogo" is set to fetch data from CPT "Companies" so there is no relation of field "requestcompany" to CPT "Companies".

Could you please check - Now its showing image but "requestcompany" filter is deleted.

#402804

Hi Minesh,

Thank you so much for making that work, but the shortcode looks the same to me... can you let me know what you did to make it work (so I don't have to bother you guys in the future)?

Thanks,
Ian

#402810

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As I explain you in my previous reply - I've deleted filter of custom field "requestcompany" from view "clogo".

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.