• I have a plugin called SliderPRO that I would like displayed on MOST of my pages.

    The code in header.php is

    <?php echo slider_pro(1, array(“width”=>”100%”, “height”=>350, “effect_type”=>”swipe”)); ?>

    What would be the function to hide the slider on specific pages?

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you want to hide the slider from only one page:

    <?php if ( !is_page ('your-page') ) {
    	echo slider_pro(1, array("width"=>"100%", "height"=>350, "effect_type"=>"swipe"));
    } ?>

    If you want to hide it on multiple pages:

    <?php if ( !is_page (array ('your-page', 34, 'Another Page')) ) {
    	echo slider_pro(1, array("width"=>"100%", "height"=>350, "effect_type"=>"swipe"));
    } ?>

    Replacing ‘your-page’, ‘Another Page’ and 34 with your pages – either using the page slug (‘your-page’), page title (‘Another Page’), or post ID (34).

    Thread Starter themo102

    (@themo102)

    That’s exactly what I needed, thanks!
    But i decided to switch it around and ONLY display the slider on the homepage, by writing:

    <?php if ( is_page ( ‘home’ ) ) {
    echo slider_pro1(1, arra…. etc etc.

    Thanks so much for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP function for removing plugin in header.php’ is closed to new replies.