8

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

19

Yes, use the orderby and order clause in your query posts.

query_posts( array('orderby'=>'menu_order', 'order' => 'ASC' ) );

See: WP_Query#Order for reference

  • 3
    Please note that you also need to use order argument, example: 'order' => 'ASC'. – iCantSeeSharp Dec 29 '15 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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