New Topic

Reply To: Different Slider for different pages with same template

Home › Forum › Customization › Different Slider for different pages with same template › Reply To: Different Slider for different pages with same template

#1113

pmichaels
Participant

I have been able to make a child theme work with two different sliders using the single line php code. When I try to use the php if condition code from your reference I get a blank page using this code:
<?php
if ( is_home() && $options[‘slider’] ) {
echo ‘<div id=”slider”>’.do_shortcode(‘[nivoslider slug=”slider”]’).'</div>’;
elseif ( is_page(39) ) {
echo ‘<div id=”slider”>’.do_shortcode(‘[nivoslider slug=”slider2″]’).'</div>’;
} else {
}
?>

I know the page id is 39 for the second page. The static index page is listed a page id 2. I can not seem to get the correct if statement to work.