issues with child pages… help? (PHP IF)
-
trying to get the gallery to show up right (this site is still in process so ignore the mess) the main issue I am having right now is the child pages. It is showing level 4(?) pages, even though I only want it to show level two… I think…
on the page I linked the pages like “Aladdin 2006” should not show in that list, I set them as child pages of a sub-gallery page (which is a child of the gallery- which is a child of the main pages… make sense? – not to me either lol – but I am still organizing it.
The pages, the individual photo albums are already linked on that page, I do not need them listed above the thumbnails, but I would like their parents listed (gallery 2, gallery 3, videos, flash gallery)
code and link below
https://www.phoenixplayers.org.uk/preview/gallery
<?php /* Template Name: Full Width */ ?> <?php get_header(); ?> <?php global $options; foreach ($options as $value) { if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = stripslashes(get_option( $value['id'] )); } } ?> <div id="content" class="wrapper fullWidth"> <div id="main"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $output; $has_children = false; if (is_page( )) { $page = $post->ID; if ($post->post_parent) { $page = $post->post_parent; } $children=wp_list_pages( 'echo=0&child_of=' . $page . '&title_li=' ); if ($children) { $output = wp_list_pages ( 'echo=0&child_of=' . $page . '&title_li='); $has_children = true; } } if($has_children == true) : ?> <div id="galleryHeaderContainer"> <div id="galleryHeader"> <ul id="galleryTitles"> <!-- <?php wp_list_pages(0, 'include=' . $page . '&number=1&title_li=' ); ?> --> <?php echo $output; ?> </ul> </div><!-- end gallery header --> <div class="clear"></div> </div> <?php endif; ?> <?php the_content() ; endwhile; else: ?>
- The topic ‘issues with child pages… help? (PHP IF)’ is closed to new replies.