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.

I have a page that lists all sub pages of the current page. Each page has been assigned an order number in the wordpress editor but they aren't ordering for some reason.

I'm set up like this:

Products

-page1

-page2

-page3

-page4

-page5

my query_posts looks like this:

query_posts('post_type=page&order=ASC&orderby='.$post->menu_order.'&post_parent='.$post->ID);

But the output comes out like:

1,3,2,5,4

How do I simply order pages with the built in page order field? I thought this was default...

share|improve this question
1  
I'm dumb, its &orderby=menu_order. Feel free to answer this for some free points. –  Wes Sep 28 '11 at 16:22
add comment

1 Answer 1

up vote 2 down vote accepted

I was going to suggest using &orderby=menu_order, but you already pointed it out in your comment. :)

p.s. you can answer your own question, I think. Since you found the answer to your question, just post your own answer. I think it's kosher to accept your own answer?

share|improve this answer
1  
Yeah, I do a lot over at stack overflow and after about a day you can accept your own answer. I've been in the WP community for years and I see your name all over the place, so I dont mind giving you a few extra points :) –  Wes Sep 28 '11 at 16:45
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.