I had the same problem but found the solution here: http://codex.wordpress.org/Template_Tags/query_posts
There is no need to change any core files. Just insert this code right above your loop, and change the variables to suit your needs.
$categoryvariable=$cat; // assign the variable as current category
$query= 'cat=' . $categoryvariable. '&orderby=date&order=ASC'; // concatenate the query
query_posts($query); // run the query
works perfectly every time.
<?php
$categoryvariable=$cat; // assign the variable as current category
$query= ‘cat=’ . $categoryvariable. ‘&orderby=date&order=ASC’; // concatenate the query
query_posts($query); // run the query
?>
When I look at this I don’t understand which part I’m supposed to replace with the title of the category that I want changed. Can someone please help me?
stairway, thanks for pointing me to the right direction! The code you have posted doesn’t behave with paging. That is, I couldn’t get posts 11-20 to show up on page 2.
My solution is to add this code above The Loop:
query_posts($query_string."&order=ASC");
This will make all of the posts in all of your categories ordered to show the oldest post first and the newest post last.
To reverse order of posts in only one category use this:
<?php if ($cat==x) {query_posts($query_string."&order=ASC"); } ?>
Where x in $cat=x is the category ID number.
Note: if you still don’t know what The Loop is, it starts with this line:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
The query_post should be ABOVE this line.