Viewing WordPress Posts in Chronological Order

A short and sweet blog post this one… if you want to share a list of posts by tag or category, or the results from a search on a WordPress blog in the order in which they were posted, just add ?orderby=ID&order=ASC to the end of the URL.

Like this:

What this means is that you can share tagged posts in a chronological view, rather than the default reverse chronological review. Which means your reader can read them in the right order without having to go through any grief…

[UPDATE: as Simon Dickson points out in a comment below, the above actually returns the order in which posts were created. For the order in which they were published, use ?orderby=date&order=ASC]

PS it works for feeds too…

PPS I just added this hack to my blog sidebar too – as a “View these posts in chronological order” link:


PPPS a whole host of other ordering parameters appear to be available too:

* orderby=author
* orderby=date
* orderby=title
* orderby=modified
* orderby=menu_order Note: Only works with Pages.
* orderby=parent
* orderby=ID
* orderby=rand
* orderby=meta_value Note: A meta_key=keyname must also be present in the query.
* orderby=none – no order (available with Version 2.8)
* orderby=comment_count – (available with Version 2.9)

On blogs at least, the pagination parameters other than order don’t appear to work though? (nopaging=true (i.e. display all corresponding posts), posts_per_page=, paged=)

Author: Tony Hirst

I'm a Senior Lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...

11 thoughts on “Viewing WordPress Posts in Chronological Order”

  1. Technically, that’ll sort them in the order in which they were initially created, rather than eventually posted – won’t it?

    The ID number gets allocated when your post first gets saved, even as a draft… and you might have a situation where you leave a draft for a few days, write and publish a new post in between, then return to your draft and publish it.

    If instead you add:


    I think that’ll give you true chronology.

    Looks like it’ll take any of the sorting options from query_posts, including rand(om) and comment_count; and of course, you can swap ASC for DESC, and have it in the opposite order.

  2. You rock. I’m constantly finding new blogs that I want to read from the beginning – you’d think this would be a common feature by now. Just added it, and it works brilliant! Thanks!

  3. I would like to be able to offer sorting options to users (on all pages – especially the main index), with options like this:

    One “bar” with viewing options:
    View – Titles, Excerpts or Full Posts

    and a second with sorting option:
    Sort By – Title, Date, or Category

  4. Hi,

    Thanks very much for this.

    I’ve now set up a new page which shows the posts in order. Is it possible to also have it display all posts by just adding something extra to the URL?

    I’ve been displaying all the posts on the home page, but it’s got to the point where there’s too much information and I’ve got to divide it up into pages. I want to have the “Read from the beginning” link to display everything though on the same page.

    Thanks Jake

Comments are closed.

%d bloggers like this: