WordPress.org

Ready to get started?Download WordPress

Forums

Short code in echo do_shortcode( not working (2 posts)

  1. AWB Collier
    Member
    Posted 1 year ago #

    Hello,

    I have been trying to get plugin shorcodes to work within my template instead of just in posts/pages. All my shortcodes work within a post or page.

    As soon as I try to call the shortcode from a plugin through

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

    Nothing loads. I have tried turning off all other plugins and tried it using a number of different plugins. I think the problem is with the echo do_shortcode() in my site.

    Can anyone shed and ideas what the problem might be?

    I have also tried to load the shortcode by creating a page with it installed in. Then referencing the content of that page in my template but can't get that to work either.

    Any help greatly appreciated.

    I was originally trying to get the following plugin to work, but have since discovered that all plugin shortcodes wont work with the do_shortcode.

    http://wordpress.org/support/topic/add-fscf-to-website-but-on-a-php-page?replies=4#post-3680074

  2. zhwatts
    Member
    Posted 10 months ago #

    There's a typo in your code. question mark should be before php at the beginning of the tag

Topic Closed

This topic has been closed to new replies.

About this Topic