Adding slider to header.php (homepage only)

Home Forums WordPress Slider Plugin Adding slider to header.php (homepage only)

This topic contains 4 replies, has 2 voices, and was last updated by  Muneeb 1 year, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #3315



    Thanks for the slider, it’s great. I have one question regarding making the slider appear in my site header on the home page only.

    I can add the following to my header.php which displays the slider;

    <?php echo do_shortcode(“[slider id='921' name='Slider1']“); ?>

    However I do not know the command or conditional tags needed to apply it to only the homepage. I have tried the following which only seems to cause a server error??

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

    <?php echo do_shortcode(‘[slider id="1888" name="myheaderslide"]‘); ?>

    <?php endif; ?>

    My home pag

    Many Thanks



    EDIT – The shotcodes in my original posts don’t match as I C&P from elsewhere.



    Please use the example below and replace do_shortcode line with your do shortcode.



    do_shortcode(‘[slider id="107" name="Home"]‘);

    why not show ?



    Please visit the link below if do_shortcode is not working for you.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Adding slider to header.php (homepage only)’ is closed to new replies.