Header Slider

I have made some modifications to the header.php and css to allow for use of Revolution Slider. I have accomplished what I was after on the home page, but now the slider shows on all pages. Maybe you can tell me what I have done that caused this to happen? Awesome theme!

My site is http://www.jillskridulis.net/

Hi,

You have added the slider’s code to header.php, but header.php will make it appear on every page, maybe try to add the slider’s code like this:

<?php if ( is_home() ):?>

Slider's code goes here...

<?php endif; ?>

Please let me know how it works.

Best Regards,
Csaba

Thanks for the quick reply. This code does the opposite of what I’m trying to achieve. It puts the slider on every page except the home page. This is what I have:

<?php if ( is_home() ):?>

<?php putRevSlider(‘JSSLIDER1’) ?>

<?php endif; ?>

Thanks

Hi,

Then, please try this instead and use the shortcode to include the slider on your homepage:

<?php
if (is_front_page() || is_home()) {
    echo do_shortcode("[revslider_shortcode_here]");
}
?>

replace revslider_shortcode_here with your rev slider shortcode and let me know how it works.

Best Regards,
Csaba

Got it! is_home is for blog home page and is_front_page is for any other home page, Once I changed it, it worked! Thanks so much for your help

I used this…

<?php if ( is_front_page() ):?>

<?php putRevSlider(‘JSSLIDER1’) ?>

<?php endif; ?>

Hi,

Great! I’m glad it worked! You’re most welcome! If you need help with anything else, please, feel free to open a new topic.

Have a nice day!

Best Regards,
Csaba