Twitter: reading for class

WordPress Quickie: Custom Query String Plugin

Jun 19, 2006 in , ,

One of the problems I have found with limiting my frontpage to only a handful of posts (for loading times purposes) is that when searching or going through the archives, everything is only shown in pages of however many posts I told it to show on the frontpage. For example, if my blog was set to show 8 posts on the frontpage, search results would be limited to 8 posts per page and the same goes for many different aspects of the site. This can become considerably annoying for your users. Thankfully, Matt Read has created an amazing plugin, Custom Query String, to tackle this problem.

CQS lets you alter the number of posts viewed for every aspect of your WordPress site, whether it’s categories, searches… really anything at all. After you have Custom Query String downloaded, uploaded to your server and enabled in the WP Admin Plugins page, go to Options » CQS. On this page you can tell WordPress how many posts are needed for each query based on the criteria you setup. Matt describes the configuration steps fairly well on the download page. In a nutshell, select the condition for which you want to specify a custom result for, then specify the number of posts to show (or the number of days posts had appeared in), finally the settings for how you want the results ordered and click add. It’s a really easy thing to figure out once you do it first hand.

PaulStamatiou.com » WordPress Quickie: Custom Query String Plugin
These are the CQS conditions that power this site. Values of -1 indicate show all posts.
PaulStamatiou.com » WordPress Quickie: Custom Query String Plugin

After setting up some custom conditions, go to your site and test them out. Everything should work. Now you can enjoy the freedom of being able to completely customize your homepage and not worry about the havoc that choice would have wreaked throughout the rest of your blog.

Promote this article on various sites or email to your friends:     



9 Comments

  1. This solves the problem I was thinking of less than a day ago. Glad there is an easy solution, I was going to hack up the php and try to force it to work somehow and probably break something.

  2. thats pretty cool, thanks for the suggestion

  3. Looks like a good find. Regarding your intro, you’re saying that you could create a custom “is_home” condition then? And from your screen capture, it looks like you can combine condtions to some degree, right? could you make a rule for is_archive AND is_category, for example?

  4. I rely heavily on my tag pages and have been trying to figure out how to use CQS for tags pages. Do you know a workaround? I tried adding is_tag to the script but no luck. I contacted Matt but no reply =(

  5. Seems like a quality plugin. I haven’t gotten it working yet, but I’m sold on the concept alone — having a simplified archive which can display a lot more posts totally beats having them displayed just like on the front page, which is what I’ve done prior to now.

  6. thanks for the tip!

  7. I was wondering, I need to be able to display the last post in each category, so that I can display a thumbnail image representing each category. Can this be down with Custom Query String? thanks.

  1. [...] Paul Stamatiou tegnap keresőt optimalizált. Tegyük mi is! Most nem a google/yahoo keresőjében elért helyezésünkön segít javítani, hanem a wordpress beépített keresőjéhez ajánl egy plugint. [...]

  2. [...] Custom Query String plugin for WordPress. Specify the number of posts that appear on each page (thanks paul). [...]

Post a comment, receive Stammy points.


Send a trackback.


  • If you plan on posting code, run it through Postable first.
Copyright © 2005 - 2008 PaulStamatiou.com  Privacy Policy - Terms of Service Can't spell my name? Use PSTAM.com. Go back up ↑.