You are on page 1of 1

Wordpress Content Slide Plugin - PHP | Wordpress Expert

http://www.snilesh.com/resources/wordpress/wordpress-plugins/wordp...

Add PHP code


To display WordPress content slide on your website you have to add following lines of code inside your themes .php files. 1 <?php if(function_exists('wp_content_slider')) { wp_content_slider(); } ?>
?

Example if you want to display this slider in your header then you have to edit the header.php file. Just open header.php from your current theme in any editor and add 1 <?php if(function_exists('wp_content_slider')) { wp_content_slider(); } ?>
?

lines at the location where you want to display the slider.

Slider Only On Home Page


In some cases you just want to display slider only on the home page in this case you have selected a page as home page from the settings->reading section. And if your home page is using default page template then you have to add following lines of code in your page.php at the location where you want to display the slider. 1 2 3 4 5 6 <?php if(is_front_page()) { if(function_exists('wp_content_slider')) { wp_content_slider(); } } ?>
?

Using above code the slider will be displayed only on home page.

Slider on a Specific page


If you want to display slider on a specific page say about then you have to use wordpress conditional tags 1 2 3 4 5 6 <?php if(is_page('about')) { if(function_exists('wp_content_slider')) { wp_content_slider(); } } ?>
?

2 of 2

24/03/2012 20:59