<?php query_posts('post_type=page&order=ASC&post_parent=20&posts_per_page=-1'); while (have_posts()) : the_post (); ?>
Which has worked fine, until I started adding new pages. Those new pages I added won't go in order. They seem to be bunched up together.
The new posts I created are not sticky posts (although I don't think pages can be). I noticed the older pages, that are arranged, were added on a specific date. Thinking that might solve it, I adjusted the date, but that didn't work.
I also tried wp_reset_query, but that didn't work either. Weird. Thoughts?
Hi there,
I have a query, like so:
Which has worked fine, until I started adding new pages. Those new pages I added won't go in order. They seem to be bunched up together.
The new posts I created are not sticky posts (although I don't think pages can be). I noticed the older pages, that are arranged, were added on a specific date. Thinking that might solve it, I adjusted the date, but that didn't work.
I also tried wp_reset_query, but that didn't work either. Weird. Thoughts?
Try adding
orderby=dateto the query stringOh yeah, there is an "orderby". This worked!
Thank you!