WordPress.org

Ready to get started?Download WordPress

Forums

Mod archives to display oldest article (3 posts)

  1. dane.modani
    Member
    Posted 3 years ago #

    Is it possible to mod the archives page to automatically display the oldest posting from the selected category?

  2. MichaelH
    Member
    Posted 3 years ago #

    To resort the order of posts, using the WordPress Default theme for example, in the wp-content/themes/default/archive.php file, just before the line:
    <?php if (have_posts()) : ?>

    put this:

    <?php query_posts($query_string . '&orderby=date&order=ASC'); ?>

    The query_posts() article explains the arguments in detail.

  3. dane.modani
    Member
    Posted 3 years ago #

    Thanks a lot :D I will try.

Topic Closed

This topic has been closed to new replies.

About this Topic