Skip Navigation

[Resolved] Theme shortcodes don’t expand in the block editor

This thread is resolved. Here is a description of the problem and solution.

Problem:

Display theme's shortcodes in the block editor.

Solution:

You can put those custom shortcodes into the shortcode block, see WP document.

Relevant Documentation:

https://wordpress.com/support/wordpress-editor/blocks/shortcode-block/

This support ticket is created 4 years, 5 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by John Appleseed 4 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1657587
shortcodes not expanding.PNG

I am trying to:
Edit my custom post content template with Toolset Blocks

Link to a page where the issue can be seen:
hidden link

I expected to see:
the theme's shortcodes expanded in the block editor live preview

Instead, I got:
the shortcodes displayed as text. See attached image.

I make use of the shortcodes provided by my theme for styling and layout, so I need to use them in my Content Templates. I've worked around it so far but it makes using the Block Editor very difficult. What should I do? Thanks for your help!

#1657875

Hello,

Toolset content template won't be able to expand shortcodes from other theme/plugins in admin side, in most cases, I suggest you put those custom shortcodes into the shortcode block, see WP document:
hidden link

And I have tested it in front-end, I can see those custom shortcodes work fine:
hidden link

And I have removed your website credentials, it is not safe to share them publicly

#1658741

Thanks! Great suggestion.