Reverse order the posts in WordPress 2.0
-
I would like to reverse order the posts in one of my WordPress 2.0 installations. I prefer not to hack the WordPress core files such as wp-blog-header.php. I also like to avoid using my-hacks.php. Is there a simple way to reverse the posts making changes only to my theme files, preferably the index.php file.
Here’s my theme ‘index.php’ file. Any help is appreciated.
[code]
<?php get_header(); ?><div id="content" class="narrowcolumn">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php require('post.php'); ?>
<?php endwhile; ?><div class="navigation">
<div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div>
<div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div>
</div><?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?>
<?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/code]
The topic ‘Reverse order the posts in WordPress 2.0’ is closed to new replies.