Support » Themes and Templates » Display posts in ascending order for a specific category only

  • I would like to display posts for a specific category in ascending order (oldest first). I have found a solution here:

    I am trying to apply that to my custom template:

     * The template for displaying Category Archive pages.
     * @package WordPress
     * @subpackage TravelBlogger
     * @since TravelBlogger Theme 1.0
    get_header(); ?>
    	<div id="yui-main">
    	   <div class="yui-b">
    			<div class="archive-meta rounded">
    				<h1 class="page-title"><?php printf( __( '%s', 'travelblogger' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1>
    					$category_description = category_description();
    					if ( ! empty( $category_description ) )
    						echo $category_description;
    			 <div id="content" class="main-content hfeed list rounded">
    					<iframe width="630" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=",86.776886&spn=11.077022,27.534484&t=h&z=4&output=embed"></iframe><br />
    					/* Run the loop for the category page to output the posts.
    					 * If you want to overload this in a child theme then include a file
    					 * called loop-category.php and that will be used instead.
    					get_template_part( 'loop', 'category' );
    			</div><!-- /.main-content -->
    			<?php get_sidebar('secondary'); ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Not being a dab hand at scripting i’m not really sure how this is done. Can anyone advise me?

    Many thanks

  • The topic ‘Display posts in ascending order for a specific category only’ is closed to new replies.