[wp-trac] [WordPress Trac] #58333: WordPress 6.2.1 Shortcodes some shortcode no longer works!
WordPress Trac
noreply at wordpress.org
Wed May 17 21:50:46 UTC 2023
#58333: WordPress 6.2.1 Shortcodes some shortcode no longer works!
--------------------------+-----------------------
Reporter: jorcus | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.2.2
Component: Shortcodes | Version: 6.2.1
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------
Comment (by kaylam):
You can also simply "create template part" ''from'' the problematic
block(s) and update your template for fewer steps.
Replying to [comment:41 pbiron]:
> Replying to [comment:7 andergmartins]:
> > For those who want to stay on 6.2.1 and need to restore the support
for shortcodes on templates, you can try this workaround.
>
> Since shortcode blocks still work in `template parts`, an easier work
around is to:
>
> 1. create a template part
> 2. move the shortcode block that was in the template to the new template
part
> 3. change the template and add the template part in place of the
shortcode block
>
> I've verified that this works.
---
It's been time-consuming to drop everything and comb through templates on
multiple websites. It wasn't just affecting proper Shortcode blocks for
us: Gravity Forms, Toolset Content Templates and (some) Views blocks... a
website using a lot of custom post types and fields had about 95% of the
content vanish into unrendered shortcodes.
Also, I'm unclear why a shortcode rendered in a Template PART is more
secure than a Template. To me, a template part is for bits I want to use
in multiple templates. I'm concerned that this Parts work-around is just a
temporary fix.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58333#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list