WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. jasonday
    Member
    Posted 3 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?

    thanks!

  2. James Revillini
    Member
    Posted 3 years ago #

    second!

  3. Syamil MJ
    Member
    Posted 3 years ago #

    Try this

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

  4. lupi73
    Member
    Posted 2 years ago #

    hello,
    not the code is not good

  5. munka
    Member
    Posted 2 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

About this Topic