An easy way to list all posts on your WordPress category pages

Wordpress makes me HappyI use Thesis for WordPress so sometimes simple hacks aren’t as easy to work into my set. Generally you choose how many pages you wanted listed on an archive or category page using the WordPress reading options. However, this preference is then set for all your archive/category pages.

What if you want 5 teasers on your front page but you want all your titles listed on a category page?

There were a few ways to accomplish this:

A little hack

The first is a small snippet of code you put into your custom_functions.php file (specific to Thesis).

function more_archives() {
global $query_string;
if (is_archive()) {
query_posts($query_string . '&showposts=9999');
}
}
add_action('thesis_hook_before_content', 'more_archives');

Change the 9999 to whatever other number if you don’t want all.

The second option is a little more dated, but I just tested it on my install using Thesis 1.6 and WordPress 2.9.2 and it worked great.

Custom Query String version 2.7

This is a simple plug-in that allows you to set various instances of displays and customize them as you need. You do need to download and then upload to install, I couldn’t find it via the WordPress built in plug-in search.

The plug-in doesn’t come with any instructions nor are there any usage instructions on the download page. However, it’s super easy to use.

Once installed, look under your admin “Settings” menu and you should see a link for “CQS”. This will take you to the admin for the Custom Query String. Again no real instructions for use – but no problem. If you want to have all your category pages list all associates posts on one page, you simply choose…

Query “is_category” and set to “-1″

Share the Insight!
If you enjoyed this article, please share the thoughts and subscribe to my free mailing list and receive updates in your inbox!

Leave a Comment

About me
Contact me
Privacy Policy and Disclosure