I'm using a plugin, NextGEN gallery, to display photos. Each gallery from this plugin corresponds to a different sub-page, so I'm using conditional shortcodes to assign the right gallery to it's corresponding sub-page. Problem is, it's not working. I've used this exact setup before without issue, which leads me to believe that whatever is causing the problem now is probably something small I'm overlooking. I think a pair of fresh eyes would help out a lot. Thanks in advance.
ETA: I've also tried putting the corresponding shortcode directly in the sub-page, which needless to say didn't work.
gallery.php
<div class="content">
<h2>PARLOUR GALLERY</h2>
<div id="stylist-list">
<h3><a href="index.php?page_id=39">REBECCA HAEHNLE</a> | <a href="index.php?page_id=41">CHRIS KELLER</a> | <a href="index.php?page_id=43">BILLY MALLOY</a> | <a href="index.php?page_id=45">VERONICA JONES</a> | <a href="index.php?page_id=47">ABBEY CASTELLANO</a> | <a href="index.php?page_id=49">QUARTIA FUTRELL</a> | <a href="index.php?page_id=51">ROOSEVELT OXENDINE</a> | <a href="index.php?page_id=53">NICOLE LUESCHOW</a> | <a href="index.php?page_id=55">MEREDITH NOWLIN</a> | <a href="index.php?page_id=57">MARICEL YALUNG</a> | <a href="index.php?page_id=59">STEPHANIE BRANDT</a> | <a href="index.php?page_id=61">JANNAH DIXON</a></h3>
</div><!-- end stylist-list -->
<div class="gallery">
<?php
if( is_page( 39 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=1]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 41 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=2]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 43 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=3]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 45 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=4]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 47 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=5]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 49 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=6]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 51 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=7]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 53 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=8]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 55 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=9]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 57 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=10]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 59 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=11]');
} else {
// output standard content here
}
?>
<?php
if( is_page( 61 ) ) {
// make your stuff here
echo do_shortcode('[nggallery id=12]');
} else {
// output standard content here
}
?>
</div><!-- end gallery -->
</div><!-- end content -->
functions.php
<?php function nggallery( $shortcode ){ echo do_shortcode( $shortcode ); /* NextGen Gallery */ } ?>
gallery.phpcome into play? Are you calling that from within yourpage.phptemplate? If so, where? (Is it in The Loop, before or after The Loop)gallery.phpis the page template for the Gallery page.page.phpis not utilized at all during this process, neither is The Loop.