Easy Nivo Slider
Hard code into post template? (5 posts)

  1. jasonday
    Posted 5 years ago #

    I assume it's possible, but I'm unsure of the format.

    I want to hardcode the plugin into my custom post type template, so that any images added to the Post Gallery will automatically display in the plugin's slideshow with a default set of parameters.

    Do you have a php code example to do this?


  2. James Revillini
    Posted 5 years ago #


  3. Syamil MJ
    Posted 5 years ago #

    Try this

    <?php echo do_shortcode('[nivo source="current-post"]'); ?>

  4. lupi73
    Posted 4 years ago #

    not the code is not good

  5. munka
    Posted 4 years ago #

    I finally figured this out and it's pretty easy.

    First, I found that the plugin does NOT recognize featured images on pages, only on posts. So select your images for your home page or front page slider by creating posts with featured images. I'm using the Shell-Lite Template on WP 3.3.1.

    Then go to any page or post and use the Easy Nivo Slider button to create shortcode on the page or post, set up the way you want your homepage slider to appear (just a temporary step to generate the shortcode).

    Then open your front page or home page template and insert the slider this way:
    <?php echo do_shortcode('[nivo number=10]'); ?> , where

    [nivo number=10]
    is the shortcode generated in the previous step.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Easy Nivo Slider
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic