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

WP 3.0.2

I've tried adding

  <?php query_posts($query_string . "&order=ASC") ?>


  <?php if(have_posts()) : ?>

in the page.php file, with no result

share|improve this question

migrated from superuser.com Jan 2 '11 at 10:22

This question came from our site for computer enthusiasts and power users.

Maybe page.php is not your friend for this one.
It depends where is the list of posts you want to modify.
Try index.php for homepage or archive.php for category based views.

Check http://codex.wordpress.org/Theme_Development#Template_Files_List

page.php is used when an individual Page is queried - that means this page is usually the only post displayed there. Playing with its order gets boring after while .)

share|improve this answer
It is unlikely that page.php is what you want. If it's the main page that your blog is viewed from then it's likely index.php if it's the archive pages then you're looking for archive.php. – curtismchale Jan 2 '11 at 13:01

Try combine

share|improve this answer

I just had this problem. You can see my thread here: Wordpress Posts Out Of Order after 3.1 Update

The problem is a bug in MySQL. You need to upgrade to 5.1

5.0.51a is causing the bug.

share|improve this answer

Your Answer


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