1

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...

  • 1
    I'm dumb, its &orderby=menu_order. Feel free to answer this for some free points. – wesbos Sep 28 '11 at 16:22
2

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?

  • 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 :) – wesbos Sep 28 '11 at 16:45

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.