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.

Is it possible to sort pages in the loop using the admin's order field (under page attributes)?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

Yes, use the orderby clause in your query posts.

query_posts( array('orderby'=>'menu_order' ) );

See: http://codex.wordpress.org/Function_Reference/WP_Query#Order_.26_Orderby_Parameters for reference

share|improve this answer
    
Awesome - thank you! –  Ryan Mar 9 '11 at 0:25
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.