Using shortcode in template file
-
Hi there,
Thanks for developing this simple to use, and lightweight plugin.
I have been using it successfully for a few weeks now on a client’s website while adding the shortcode via the admin. Now, however, there is a page that won’t allow for the shortcode to be added this way. Instead, I need to add it via the page template file. However, adding the php below does not work.
<?php echo do_shortcode('[random_content group_id="12"]'); ?>
I am guessing that I am doing something wrong, but, I am afraid, I can’t work out what. In case it helps, the following does work fine:
<?php echo do_shortcode('[logocarousel id="150"]'); ?>
Any help you can offer would be most appreciated.
With kind regards,
Mark @ SYPO
- The topic ‘Using shortcode in template file’ is closed to new replies.