• Goal: each page (not post) has a slideshow with a different gallery.

    Conditions: the slideshow shall be located in header.php

    Solution: missing.

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes – you need to utilize conditional tags.

    See this codex article – check out snippet 3 for some good hints.

    I did something like this, to have a different slideshow per page:

    <?php if (is_page('4')  || $post->post_parent == '4' ) : ?>
             <?php if (function_exists("nggSlideshowWidget"))
               {nggSlideshowWidget($galleryID=2,$Width=390,$Height=260); }
    
    <?php elseif (is_page('5') || $post->post_parent == '5'  ): ?>
             <?php if (function_exists("nggSlideshowWidget"))
               {nggSlideshowWidget($galleryID=3,$Width=390,$Height=260); }
             ?>
    
    <?php endif ?>

    But NGG Slideshow just sits there showing the loading icon forever…
    Anyone know what’s wrong? Some syntax problem with nested if’s?

    PS: Galleries exists, and images inside galleries present

    …Nevermind, just solved it myself:

    <?php if (is_page('4')  || $post->post_parent == '4' ) : ?>
                   <?php if (function_exists("nggSlideshowWidget"))
                nggSlideshowWidget($galleryID=2,$Width=390,$Height=260); ?>
    
    <?php elseif (is_page('5') || $post->post_parent == '5'  ): ?>
                   <?php if (function_exists("nggSlideshowWidget"))
                nggSlideshowWidget($galleryID=3,$Width=390,$Height=260); ?>
    <?php endif; ?>

    It’s always that last thing you try.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: NextGEN Gallery] different slideshow per page in the header’ is closed to new replies.