What is the best way to register a short code with Woodmart.
I am trying to create short code to use in the Product Layout template that will display and image or a video via ACF that my team will use.
In order to test I create a simple shortcode that outputs a string.
add_shortcode('shortcode_test', 'display_shortcode_test');
function display_shortcode_test() {
// Restrict to single product pages only
if (!is_singular('product')) {
return '';
}
// Return test string
return 'Short Code Test';
}
I then use the Gutenberg short code block on the Single Product Layout from Woodmart with the following [shortcode_test]
.
However on the front end its just displays plain text: [shortcode_test]
its almost as if its not registering it.
I am using the lates Woodmart with a child theme.
Thanks