Title: Hard code into post template?
Last modified: August 19, 2016

---

# Hard code into post template?

 *  [jasonday](https://wordpress.org/support/users/jasonday/)
 * (@jasonday)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/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?
 * thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [James Revillini](https://wordpress.org/support/users/jrevillini/)
 * (@jrevillini)
 * [15 years ago](https://wordpress.org/support/topic/hard-code-into-post-template/#post-2051975)
 * second!
 *  [Syamil MJ](https://wordpress.org/support/users/sy4mil/)
 * (@sy4mil)
 * [15 years ago](https://wordpress.org/support/topic/hard-code-into-post-template/#post-2051987)
 * Try this
 * `<?php echo do_shortcode('[nivo source="current-post"]'); ?>`
 *  [lupi73](https://wordpress.org/support/users/lupi73/)
 * (@lupi73)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/hard-code-into-post-template/#post-2052058)
 * hello,
    not the code is not good
 *  [munka](https://wordpress.org/support/users/munka/)
 * (@munka)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/hard-code-into-post-template/#post-2052061)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/easy-nivo-slider.svg)
 * [Easy Nivo Slider](https://wordpress.org/plugins/easy-nivo-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-nivo-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-nivo-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-nivo-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-nivo-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-nivo-slider/reviews/)

 * 4 replies
 * 5 participants
 * Last reply from: [munka](https://wordpress.org/support/users/munka/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/hard-code-into-post-template/#post-2052061)
 * Status: not resolved