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 6 months, 3 weeks ago.

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

    Steve

    Hi

    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

    #3316

    Steve

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

    #3318

    Muneeb
    Member

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

    #3393

    Ple

    <?php
    do_shortcode(‘[slider id="107" name="Home"]‘);
    ?>

    why not show ?

    #3464

    Muneeb
    Member

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

    http://wordpress.org/support/topic/do_shortcode-1

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

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