• 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeremy Green

    (@endocreative)

    Does the shortcode output anything when using do_shortcode, or is it simply blank?

    Thread Starter SYPOMark

    (@sypomark)

    Hi Jeremy,

    Thanks for getting back to me.

    When using do_shortcode in a php template file, it just outputs nothing at all.

    With kind regards,

    Mark

    • This reply was modified 5 years, 2 months ago by SYPOMark.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using shortcode in template file’ is closed to new replies.