Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

Home Forums Support Sorting Posts

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #27189

    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=”; 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.

    Lead Developer
    Lead Developer

    You may find this plugin to be very helpful:

    Let me know πŸ™‚


    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??

    Lead Developer
    Lead Developer

    I’m surprised – there’s very few plugin that will accomplish this.

    Maybe this one?


    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:

    That do what I wish.

    Thx for your help.

    Lead Developer
    Lead Developer

    Glad you found one that works πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.