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?
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?
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.
This topic has been closed to new replies.