Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using this bit of code to generate a page full of items but they won't sort into the menu order, any ideas as to why?

   <?php $pages = get_pages(array('child_of', 'menu_order')); ?> 
share|improve this question
1  
Why did you create $arg for arguments and didn't use it? –  Rilwis Jun 8 '11 at 14:23
    
That makes no sense, check the codex for the right syntax! codex.wordpress.org/Function_Reference/get_pages –  Horttcore Jun 8 '11 at 14:59
add comment

1 Answer

up vote 3 down vote accepted

It should look sth like this

<?php
$pages = get_pages( array('sort_column' => 'menu_order') );
?>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.