OUseful.Info, the blog…

Trying to find useful things to do with emerging technologies in open education

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:

http://digitalworlds.wordpress.com/category/what-is-a-game/?orderby=ID&order=ASC

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 wordpess.com 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=)

Written by Tony Hirst

March 25, 2010 at 3:34 pm

Posted in Anything you want

Tagged with

11 Responses

Subscribe to comments with RSS.

  1. [...] tip from Viewing WordPress Posts in Chronological Order  psoted to the OUseful.Info, the [...]

  2. 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:

    orderby=date&order=ASC

    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.

    Simon Dickson

    March 25, 2010 at 3:47 pm

  3. Very, very cool. hanks Tony!

    Jim

    March 25, 2010 at 3:49 pm

  4. [...] geeks will see the URL includes the WordPress trick I posted [...]

  5. [...] Hirst is full of useful tips for using WP. Tony pointed out to me that you can extract the content from a WP page using a single-page feed, [...]

  6. 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!

    dogberry

    July 26, 2010 at 5:04 pm

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

    webdesignpatna

    December 1, 2010 at 11:36 am

  8. When using WP as a CMS conditional posting is a necessity. Hurray for Alphabetical Listings!

    webhostingruchi

    December 1, 2010 at 11:45 am

  9. In case you need to change the posts order you can use Post Types Order . Using a drag and drop interface you can easily make the sort

    nsp-code

    May 13, 2011 at 2:39 pm

  10. 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

    Jake

    January 19, 2012 at 1:48 pm

  11. [...] (e.g. stories), add this to the browser address: ?orderby=date&order=ASC  (Thanks Tony Hirst.) ?order=ASC  also seems to work. (Thanks happy accident [...]


Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 807 other followers

%d bloggers like this: