• Resolved rnarian

    (@rnarian)


    Hello, my site is http://www.inspiredautosport.com and I want to display the NGG Gallery Slideshow on my Front Page Header only. I inserted the code below in my Header.php file but the slideshow is displaying on all pages, instead I only want it on the Home page, can anyone help in how I can do this?:

    <div class=”sg-header-area”>

    <div class=”header-wrap”>

    <?php
    do_action( ‘sgwindow_header_image’ );

    get_sidebar( ‘top’ );
    ?>
    <div class=”frontpage_slideshow”>
    <?php
    $showgallery = ‘[slideshow=1]’;
    $showgallery = apply_filters(‘the_content’, $showgallery );
    echo $showgallery;
    ?>
    </div>

    </div><!– .header-wrap –>
    </div><!– .sg-header-area –>

    <div class=”main-area”>

    https://wordpress.org/plugins/nextgen-gallery/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @https://wordpress.org/support/profile/rnarian – If you want something to only appear under certain conditions in the header, such as the “Front Page” then you will most likely need to adjust your theme template(s) to handle this. Although you are trying to use a NextGEN Gallery Slideshow this is not actually a NextGEN Gallery related issue as you are describing it.

    Thanks!

    – Cais.

    Thread Starter rnarian

    (@rnarian)

    Which theme file do I need to update and with which code? Any help is appreciated.

    Plugin Contributor photocrati

    (@photocrati)

    @rnarian – This would really be more a question for the theme author but in general terms:

    1. You would need to create a second header.php template file such as, for example, header-front-page.php or header-home.php
    2. .

    3. Then from the front-page.php or home.php template, as the case may be, call the “second” header template from the step above.

    … but, again, your theme author would be the better person to get the most correct method of doing this. The above is just tapping into the Template Hierarchy and using the get_header() function.

    – Cais.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Next Gen Gallery Slideshow in Header’ is closed to new replies.