• I realized I should have started a new thread rather than piggy-backing on a resolved thread. I’ve used the code there to display a loop of child pages on a parent page, in the main body. My problem is that the children are sorting in the wrong order, and all my attempts to affect the sorting using the order and orderby attributes of query_post are failing.

    The relevant code is:

    <?php /* THE LOOP */
    if (have_posts()) : ?>
    
    	<?php /* This outputs the next/previous post or page navigation.
    	This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
    	bfa_center_content($bfa_ata['content_above_loop']); ?>
    
        	<?php query_posts(array('showposts' => 22, 'post_parent' => $post->ID, 'post_type' => 'page', 'order' => 'ASC', 'orderby' => 'menu_order')); while (have_posts()) { the_post(); ?>

    I am using WP 2.8.6 with the index.php template in the Atahualpa theme.

    Again, I’ve tried the order and orderby attributes in various combinations and placements — in this query_posts tag, in a separate one outside the loop, inside the loop, etc.

    I think one thing that is throwing me off is that Atahualpa splits up “if (have_posts())” from “while (have_posts()) { the_post()”. Not sure if this is relevant at all, but everything I’ve found in the codex and the forum indicates that something like “order=ASC&orderby=menu_order” should work perfectly.

    Thanks to anyone for the help.

Viewing 1 replies (of 1 total)
  • Thread Starter Darren_S

    (@darren_s)

    I’m still having this problem with WP 2.9.1 and the Atahualpa theme. Is anyone able to offer advice on sorting my child pages in the proper order? Or know why the standard query_posts variables above aren’t working as they should?

    Thanks.

Viewing 1 replies (of 1 total)
  • The topic ‘Loops of Child Pages is Sorting Wrong’ is closed to new replies.