tube press short code in page template (5 posts)

  1. kataklyzmcom
    Posted 6 years ago #

    <?php echo do_shortcode('[tubepress]'); ?>

    trying to put this in my page template

    all it does is print out the word tubepress

    it works when i post in a page or a post

    help :(

  2. esmi
    Forum Moderator
    Posted 6 years ago #

    Shortcodes are normally parsed as part of the_content() functions/filters. So they won't work in a template. You may need to dig further into that plugin's files to see what (if any) functions you can call in place of the shortcode.

  3. Postmatic
    Posted 6 years ago #

    This article will show you how. I just tried it an it worked great.

  4. fewpeople
    Posted 6 years ago #

    @vernal --> that's the same thing kataklyzmcom tried....
    does anybody know the solution to this?

  5. rogeber
    Posted 6 years ago #

    Try this:

    <?php echo apply_filters('the_content', '[tubepress]'); ?>

    It treats the shortcode (or whatever you put in that second argument) the same as the_content, so then it'll get parsed.

    Worked for me, anyway.

Topic Closed

This topic has been closed to new replies.

About this Topic