Ah, me too. I am having this problem. I have a site where the page “About” has 5 sub-pages, each with a page order assigned. I am using this code to display the sub-pages in the about page:
<?php $defaults = array(
'depth' => 0, 'show_date' => '',
'date_format' => get_option('date_format'),
'child_of' => 2, 'exclude' => '',
'title_li' => __('Pages'), 'echo' => 1, 'authors' => '', 'sort_column' => 'page_order') ;
$r = wp_parse_args( $args, $defaults );
$all_pages = get_pages($args);
foreach($all_pages as $page) :
if ($page->post_parent == $post->ID){ ?>
<div class="section">
<? $get_thumbnail = get_post_meta($page->ID, 'section-thumbnail', true);
if ($get_thumbnail != ''){
?>
<img src="https://localhost/****/img/<?=$get_thumbnail ?>"/>
<? } ?>
<a class="move" href="#"><h1> <?=$page->post_title ?> </h1> </a>
<div class="sub_section" >
<?=$page->post_content ?>
<p class="clear"></p>
</div>
</div>
<?
}
endforeach;
?>
This is excellent at pulling the sub-pages into the parent, but I can not figure out how to sort them. The sort_column is not showing me the desired effect, which is to sort by page order. The sub-pages are sorting alphabetically. Any help is greatly appreciated.
btw- first post – first WP site