Support » Plugin: Easy Nivo Slider » Hard code into post template?

  • 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?


Viewing 4 replies - 1 through 4 (of 4 total)
  • second!

    Try this

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

    not the code is not good

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hard code into post template?’ is closed to new replies.