Skip Navigation

[Closed] Unable to use shortcode within shortcode

This support ticket is created 8 years 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 8 years ago.

Assisted by: Beda.

Author
Posts
#385030

I've been unable to use shortcodes within shortcodes following this guide:
https://toolset.com/documentation/user-guides/shortcodes-within-shortcodes/

I have a shortcode [youtube-video] that I have registered in Settings > Third-party shortcode arguments

This is the code in my template. The problem is that the rest of the page HTML code after this shortcode renders not as HTML but as text.

[youtube-video video_id='[types field="youtube-url-code" output="raw"][/types]']
#385164

Since this involves a Custom ShortCode, I can not know what happens here.

Let's try to narrow it down together.

1. [types field="youtube-url-code" output="raw"][/types]

- What does this output if you paste the ShortCode or create it with the GUI directly, not nested in your ShortCode

2. [youtube-video video_id='']

I assume, you expect a ID to be based here.
Usually, ID's are numerical values.
Your above Types field instead seems a URL

Anyway, what is [youtube-video video_id=''] outputting on it's own, if you pass a manually entered ID (whatever value you have coded here)?

3. Please then analyze both results.
Are they outputting what you expect?

4. Try to register both ShortCodes (your Custom AND the Types one) in the Toolset > Settings.

Can you tell me above results?

The topic ‘[Closed] Unable to use shortcode within shortcode’ is closed to new replies.