WordPress.org

Ready to get started?Download WordPress

Forums

Promotion Slider
Shortcode in template file not working (3 posts)

  1. MariaMSM
    Contributor Day Volunteer
    Posted 2 years ago #

    Hi,
    I put the slideshow on a page by itself and it works beautifully. I need to put the shortcode in my homepage.php (using TwentyEleven child theme). I have an image as a place holder for now.

    Here is my shortcode: [promoslider category="home" width="621px" height="439px"]

    I tried:
    <?php echo do_shortcode('[promoslider category="home" width="621px" height="439px"]'); ?>

    The shortcode will go after an opening div tag.

    Help?!

    http://wordpress.org/extend/plugins/promotion-slider/

  2. Micah Wood
    Member
    Plugin Author

    Posted 2 years ago #

    Is homepage.php a custom template? Have you selected it to be used for the page in question?

    The reason I ask is that homepage.php is not a default Twenty Eleven file and unless you set something up so that file is checked for in your child theme then that could be the reason that you aren't seeing what you expect. The code you used in the file seems correct.

  3. MariaMSM
    Contributor Day Volunteer
    Posted 2 years ago #

    Hey woodent,

    Thanks for the plugin! I actually just fixed this by creating a new page template and just pulled the shortcode off the actual page instead of putting it in my template file. It works beautifully.

    Thanks for the response!

    Maria

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic