Plug-in's shortcode works in post but not with do_shortcode
I have started using the Store Locator plug-in (http://www.viadat.com/store-locator/), and it looks very promising.
I have one problem. If I enter its shortcode (“[STORE-LOCATOR]”) in the content of a post/page it is processed correctly. But if I enter it in a custom template with
<?php echo do_shortcode('[STORE-LOCATOR]'); ?>
it does not work, and just outputs the [STORE-LOCATOR] text. I found a mention of this same problem on the Stack Overflow tech site, but nowhere else.
I am able to use do_shortcode with my own custom shortcodes, added in my functions.php.
I’m not an expert in WP sequencing, but it seems like the plug-in is not loaded/initialized at the time it executes do_shortcode, but is loaded by the time it processes the $content. Is there a way to adjust this?
- The topic ‘Plug-in's shortcode works in post but not with do_shortcode’ is closed to new replies.