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.

How can I order a query by parent page attribute first and then by child page attribute? By title or by menu_order is acceptable.

For example, if my query matches child pages, and my search results page displays a list of parent titles with subpage titles...

Names - Joe
Names - Reuben
Names - Victor
Sandwiches - Hamburger
Sandwiches - Reuben

I want them sorted as above in alphabetical order of parent then of child, or by menu_order of parent then of child. If you want a reason, it's because some of my subpages have matching titles and need further categorization.

share|improve this question
What have you tried (in code)? –  kaiser Apr 22 '14 at 17:29

Your Answer


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

Browse other questions tagged or ask your own question.