I am trying to use the orderby
parameter in the get_children
function as below:
$navigation = get_children(array(
'post_parent' => $parent->ID,
'orderby' => 'menu_order'
));
But it is having no effect on the result; it is still ordering by the default creation date.
Any ideas?
Are you sure you need this specific function? Documentation (both Codex and inline) is verrry confusing. And it supposedly fetches things like attachments, which probably aren’t relevant for navigation…
Try this:
get_posts( array(
'post_type' => 'page',
'post_parent' => $parent->ID,
'orderby' => 'menu_order'
) );