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

  1. MariaMSM
    Contributor Day Volunteer
    Posted 4 years ago #

    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.



  2. Micah Wood
    Plugin Author

    Posted 4 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 4 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!


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Promotion Slider
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic