Wordpress - Display newest posts last

drogon

Elite Member
Joined
May 28, 2010
Messages
2,812
Reaction score
1,473
How can i set a blog to add new posts as last entry and not first entry on my blog?

Cheers.
 
follow this:

when you log in, go to settings - reading - and choose display latest posts, hope it helps

thanks!
 
Hi,

I am afraid you are going to have to change the index.php file but there is only one line to change.

open your index.php file and search for :

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

replace this with:

<?php $posts=query_posts($query_string . '&order=asc');
if (have_posts()) : while (have_posts()) : the_post(); ?>

nothing else. This shoudl then return a list with oldest posts first.
 
follow this:

when you log in, go to settings - reading - and choose display latest posts, hope it helps

thanks!

Sorry but this path does not exist in Wordpress!
 
Hi,

I am afraid you are going to have to change the index.php file but there is only one line to change.

open your index.php file and search for :

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

replace this with:

<?php $posts=query_posts($query_string . '&order=asc');
if (have_posts()) : while (have_posts()) : the_post(); ?>

nothing else. This shoudl then return a list with oldest posts first.


Tried that but nothing happened. Thanks anyway.
 
You did make this amendment to your index.php of your theme right? I guess I shoud have said that. If you are using a theme which has a home.php or index.php, this is the file you need to change.
 
Yes, i amended the index.php file as above but absolutely nothing happened!

I am using the Evolve theme.
 
<?php
$args = array( 'post_type' => 'post', 'orderby' => 'date', 'order' => 'DESC' );
query_posts($args);

if (have_posts()) : while( have_posts() ) : the_post();
?>

YOUR POST HTML

<?php endwhile; endif; wp_reset_query(); ?>
 
if you have that plugin still intsalled open up your index file and add this
PHP:
<?php sort_query_posts_by('date', 'desc'); ?>
It needs to go just before the loop starts . if your theme is evolve 1.2.7 the loops starts with
PHP:
<?php if ( have_posts() ) : ?>
unfortunately evolves index has 5 loops on it . I think you only need to add it before the loops that start at lines 385,592,799

make a back up of your index file first before altering anything
 
Change the date of the new post older than the date of the last post.
 
Back
Top