I need to know how to arrange posts in a category by ascending date (earliest on top of page/latest on bottom - i.e. the opposite of the default date arrangement) Any ideas?
I need to know how to arrange posts in a category by ascending date (earliest on top of page/latest on bottom - i.e. the opposite of the default date arrangement) Any ideas?
You could use following code:
<?php
add_filter('posts_orderby', 'action_order_ascending');
function action_order_ascending($orderby)
{
return 'post_date ASC';
}
?>
untested, but WordPress source says that it will work.
Didn't get that to work, but I did figure it out, adjusting the Alphabetizing Posts script, I did the following
<?php
$posts = query_posts($query_string .
'&orderby=date&order=asc&posts_per_page=-1');
if (have_posts()) : while (have_posts()) : the_post(); ?>
This worked just fine.
This topic has been closed to new replies.