List posts in chronological order in Category archive
-
I have hunted through google, and tried different plugins, but still can’t achieve what I am aiming to do.
The goal is simple. When I display a Category page, I want the posts to be displayed in chronological order (ie oldest at the top) which is the reverse of the defail order.
How do I do that without changing the order of other pages – eg the home page or the archive page?
I am using twentyfourteen, and the category.php has this code:
<?php if ( have_posts() ) : ?> <header class="archive-header"> <h1 class="archive-title"><span style='color:gray'>DDDB Case Reports: </span><?php printf( __( ' %s', 'twentyfourteen' ), single_cat_title( '', false ) ); ?></h1> <?php // Show an optional term description. $term_description = term_description(); if ( ! empty( $term_description ) ) : printf( '<div class="taxonomy-description">%s</div>', $term_description ); endif; ?> </header><!-- .archive-header --> <?php // Start the Loop. while ( have_posts() ) : the_post();
Do I put something in there to reverse the order, and still have it paginate correctly?
Thanks!
Noel
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘List posts in chronological order in Category archive’ is closed to new replies.