Closed ianlin closed 2 years ago
It's not an issue with the theme.
It is a more general issue with Gutenberg/FSE, in that shortcodes do not work when added to a template (e.g. page, single etc), and only work when the shortcode is inside a tempate-part (e.g. header or footer).
Templates such as page can contain other template-parts besides header and footer, and the workaround is to first add a custom template-part in the page template, then add the shortcode inside the custom template-part.
I'm not sure if this is a bug or whether this is intended behaviour, or just how FSE was always intended to work regarding shortcodes.
Yeah, I don't believe this is due to anything in the theme. I suggest you add some notes to the Gutenberg issue here, which seems to describe a similar problem: https://github.com/WordPress/gutenberg/issues/35258
@Andrew-Starr and @kjellr
Thanks for the info, I'm not that familiar with all that themes, FSE, etc, still learning. It makes more senses to report this in Gutenberg repo. Cheers! 😄
Closing this as this issue (or feature) is not related to the theme itself.
Describe the bug
This was discovered while I was doing compatibility tests for WordPress 5.9 and one of our plugin
woocommerce/woocommerce-product-finder
.When adding widgets using shortcodes in FSE, if I add the shortcodes outside of the Header or Footer blocks, the widgets are not rendered on the front end.
It's originally reported in
30-gh-woocommerce/woocommerce-product-finder
, but seems it's related to the theme itself rather than the plugin.To Reproduce
Steps to reproduce the behavior:
5.9-beta1
and WooCommerce6.0.0-rc.1
Twenty Twenty-Two
Appearance
->Editor beta
[woocommerce_cart]
Expected behavior
A WooCommerce cart widget should be displayed.
Screenshots
Full Site Editing the Twenty Twenty-Two Theme Home Page
Front End Display Twenty Twenty-Two Theme Home Page
Device: