Support » Fixing WordPress » Only 1 child page showing of 9…why oh why?

  • On my page I have the following code (on a template called Subpage)

    (I got the code from another thread in WordPress).

    	$pageChildren = $wpdb->get_results("
    		SELECT *
    		FROM $wpdb->posts
    		WHERE post_parent = ".$post->ID."
    		AND post_type = 'page'
    		ORDER BY menu_order
    	", 'OBJECT');
    	if ( $pageChildren ) :
    		foreach ( $pageChildren as $pageChild ) :
    			setup_postdata( $pageChild );
    		<div class="entry">
    			<img src="<?php $values = get_post_custom_values("thumbnail"); echo $values[0]; ?>" class="left"><?php $values = get_post_custom_values("excerpt"); echo $values[0]; ?>
                <p align="right"><?php print '<a href="' . get_permalink( $pageChild->ID ) . '">[more]</a>'; ?></p>
            <br clear="all">
            <hr class="snip" />

    Which grabs all child pages and outputs some info & custom fields on a page.

    And once someone clicks on the child page link for some only the first page (the Mike Clayville one) works and all the rest don’t. All child pages use the same template “Page.php”…

Viewing 1 replies (of 1 total)
  • I have now upgraded to 2.6.1 to see if that would fix the problem, but still getting the same issue.

    I also tried unpublishing the first sub page, to see if that would fix things but it still hasn’t.

    Any help would be appreciated.



Viewing 1 replies (of 1 total)
  • The topic ‘Only 1 child page showing of 9…why oh why?’ is closed to new replies.