WordPress Reverse List a Particular Category

Screen Shot 2016-01-18 at 9.18.02 PM

I often get requests from instructors that ask me to get WordPress to behave in a way that’s just different enough that WordPress fights them. Now that I can mostly program, I could make quick child themes to deal with this but that causes me the hassle of keeping all that stuff straight so I still do some quick and dirty stuff with plugins.

This example is based on an instructor who wanted one particular category (lesson plans) to list from oldest to newest rather than the default WP blog layout of newest to oldest. That’s a pretty easy thing to do if you use the List Category Post plugin.

Once you’ve got the plugin on and you’ve found the category id (mouse over the category when you’re in Dashboard>Categories and look for id= in the URL at the bottom of the page) all you need to do is put in
[catlist id=9 numberposts=-1 order=asc]

In this case, it says get the posts in the category with id 9, -1 means get all of them, and order them from lowest to highest/ or oldest/newest.

That’s it. I’ve now got a page that shows all 41 lesson plans from oldest to newest and no child theme to keep track of.

One thought on “WordPress Reverse List a Particular Category

  1. I use that plugin often, it’s got al kinds of uses (like displaying a list of posts in a page). A variant you might find useful is Post Types Order https://wordpress.org/plugins/post-types-order/ – it lets you put posts in any order via an ajax drag interface (but it affects all posts on a site). It’s what I use on my presentation type sites.

    Either way is MUCH better than fiddling with munging the dates to get the order

Comments are closed.