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')); ?>
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
edited Jun 8, 2011 at 14:46
Rob
asked Jun 8, 2011 at 14:00
RobRob
1,41613 gold badges41 silver badges68 bronze badges
2
- 1 Why did you create $arg for arguments and didn't use it? – Anh Tran Commented Jun 8, 2011 at 14:23
- That makes no sense, check the codex for the right syntax! codex.wordpress/Function_Reference/get_pages – Horttcore Commented Jun 8, 2011 at 14:59
1 Answer
Reset to default 11It should look like this:
<?php
$pages = get_pages( array('sort_column' => 'menu_order') );
?>