Site logo

Archived topic

Sorting Posts

5 replies · Started by Anonymous on September 10, 2014

Viewing posts 1–6 of 6

WP sorts the posts by day. Newest Post on TOP.
I need the oldest on TOP, so I have to manipulate your /wp-content/themes/generatepress/index.php in line 19

get_header(); ?>

<div id="primary" <?php generate_content_class();?>>
<main id="main" <?php generate_main_class(); ?> itemtype="http://schema.org/Blog" itemscope="itemscope" itemprop="mainContentOfPage" role="main">
<?php do_action('generate_before_main_content'); ?>
<?php query_posts($query_string. "&order=ASC"); ?>
<?php if ( have_posts() ) : ?>

<?php /* Start the Loop */ ?>

Thats quick and dirty.
Is there a way where you can implement this under section layout to sort by DESC or ASC??
That would be nice and professional.

Hi Tom,
I have checked this plugin but I can only sort the Posts by drag and drop and thats not useful for me. I do not found a way to sort the Posts by Date and ASC, mean first Post first - last Post last mybe my manipulate the php-code but thats the same that I have done with your code in the template.

Do you have a other suggestion please??

Thx for answering Tom.

I check the last plugin you suggested me to test it.
This plugin chance the order only when you sort by category, no function when you click on Home-Button.

Now I have installed this plugin:
http://wordpress.org/plugins/default-sort-ascend/

That do what I wish.

Thx for your help.

Glad you found one that works :)

This archived topic is closed to new replies.