Support » Themes and Templates » 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

    Template Name: Full Width
    <?php get_header(); ?>
    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=' ); ?> -->
    			echo $output;
    	</div><!-- end gallery header -->
        <div class="clear"></div>
        <?php endif; ?>
        <?php the_content() ;
        endwhile; else: ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘issues with child pages… help? (PHP IF)’ is closed to new replies.