Forums

How to allow visitor to read oldest posts first (original chronology)? (3 posts)

  1. .brum
    Member
    Posted 1 year ago #

    Hello,

    Is there a way to allow visitor to change the default reversed chronology when reading a chain of posts? I realize that reverse chronology is the blogging "standard" and works well if you follow something on a regular basis, but if you want to catch up with a year of posts one would like to start from the beginning and work one's way towards the newer posts.

    My searches yielded plug-ins for reversing comments, but I didn't find anything regarding posts. And it would need to runtime and optional, something like a button next to a chain "Read me from the beginning" :).

    Rgds,

    .brum

  2. Vaughan van Dyk
    Member
    Posted 1 year ago #

    Hi,

    That's a good question as I'm sure a few of us have wanted to display posts in the 'non-standard' way. To do this, you need to use the query_posts template tag and set the order parameter to ascending (the default is a descending chronological order). You use this tag outside of The Loop, such as in this basic example:

    <?php query_posts("order=ASC"); ?>
    	<?php if (have_posts()) : ?>
    	<?php while (have_posts()) : the_post(); ?>

    query_posts is a very powerful way of configuring how you want posts displayed and more variations of its use can be found here:
    query_posts Codex link

    Hope that helps.
    Vaughan

  3. .brum
    Member
    Posted 1 year ago #

    Vaughan,

    Thank you for your answer! That sounds like the right thing, although I'm new to WP and template scripting, so I'll check it out.

    .brum

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.