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.


Like this article? Leave a tip.

Handcrafted by Stammy for 19.29 years · Comments