Order subpages by date
-
Hey folks, I’m tweaking a template and it has subpages within a page. I want to order the subpages by date (newest first).
How can I do that?
Here’s what the code looks like:
<div id="content"> <?php if(is_front_page()) include( TEMPLATEPATH . '/lib/inc/slider.php'); ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h2<?php if(!has_post_thumbnail()) echo ' class="h2-nothumb"'; ?>> <?php the_title(); ?> </h2> <?php if((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?> <div class="post-img"> <?php the_post_thumbnail('dli-large', array('alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'')); ?> </div> <?php endif; // endif post thumbnail ?> <?php the_content(); ?> </div> <?php endwhile; ?> <?php include( TEMPLATEPATH . '/lib/inc/subpages.php'); ?> <?php if(ts_get_option('ts_pages_comments')) comments_template('', true); ?> </div> <!-- end content -->
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Order subpages by date’ is closed to new replies.