WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We can order pages by title.

Also we can sort them by menu_order.

Is it possible, to order pages by menu_order and title at the same time?

share|improve this question
up vote 6 down vote accepted

Use 'orderby' => 'title menu_order' or &orderby=title menu_order (depending of the syntax you use for your query parameters).

share|improve this answer
Wow. Does that work? I'll have to try it out... It doesn't look like it should from the source... – goldenapples Oct 19 '10 at 21:20
See line 2139, wp-includes/query.php – sorich87 Oct 19 '10 at 21:54
Yup, its in there. Thanks - I never realized that was possible! – goldenapples Oct 20 '10 at 16:52
It doesn't seem to be documented anywhere. I actually discovered it while browsing through the code. :) – sorich87 Oct 20 '10 at 18:15
wow... didn't know. looked in the codex and learned alot: none makes it empty and it really is an array exploded by spaces. already added it to the codex. – kaiser Feb 4 '11 at 5:10

Your Answer


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.