Best WordPress Plugins: Custom Query String

Daniel

WordPress allows the user to set the number of posts that are to be displayed on every page. The problem with that feature on the Control Panel is that it affects all the types of pages around the blog. If you set this number to 5 you will have 5 posts on the Homepage, on the categories, on search results and so on.

As you can notice from my sidebar, the only way for the readers to navigate around the blog is through the categories. Having only 5 posts displayed on each category page (which is the number I use for the Homepage) is not efficient since it would force readers to browse across several pages before being able to see all the posts contained there.

customquerystring1.png

The solution for this problem is the Custom Querry String plugin (download link) . After installing it you will be able to set the number of posts (custom queries) for every single page on your website. Here are some of the pages that you will be able to customize:

  • author
  • archive
  • category
  • year
  • month
  • day
  • search
  • feed
  • home

Browse all articles on the WordPress category or check the recommended articles for you below:

166 Responses to “Best WordPress Plugins: Custom Query String”

  • Ville

    I got busy with some server stuff for a while and missed these comments for a while. Anyway, I just upgraded to WP 2.6.1, K2 1.0-RC7, and installed CQS 2.9 (‘reloaded’). Now the pagination seems to work on the front page (i.e. only the most recent post on the front page and correct number of “history” pages indicated), but is_archive is not responsive. This may again be because of K2, but the value set by is_archive is not respected and any number of archive items are shown on an archive page.

    The front-page pagination was the most important issue for me, so I can live with this now, but just wanted to let you know the is_archive may be something to look into (with K2 installed).

    I tried the 2.7 also, and with the above mentioned versions it seems to work the same way — i.e. no difference between 2.7 and 2.9.

  • Cirilo Veloso Moraes

    Its a very cool plugin.
    Tks, dude.
    See ya.

  • Wordpress Blog Setup

    Excellent wordpress set up advice cheers

  • Ian

    No problem Joe 🙂

  • Ian

    @Daniel – I noticed when you wrote the post. My comments were in response to your advice to Joe and Ville

    “Ville and Joe, it is working fine here both on 2.5.1. and 2.6. Make sure it is not just clashing with another plugin you might have installed.”

    Maybe you could include include an edit at the bottom of the post recommending the Reloaded Plugin for those who are having problems.

    It works in exactly the same way as 2.7 so you instructions are still applicable.

    Don’t think I’m trying to pick holes Daniel. I’m just trying to help. I had the same problem with the plugin as Joe so just relaying what works 🙂

  • Joe, Web Design

    Awesome!

    Custom Query String Reloaded fixed it.
    This according to the version numbers would make it Custom Query String 2.9.

    Thanks for all the help.

  • Daniel Scocco

    @Ian, I just said the plugin is working for me on 2.5.1 and 2.6, I didn’t say it was 2.6 compatible or anything.

    Also not sure if you noticed, but I recommended this plugin on March 2007.

    I guess you need to check the facts also.

  • Ian

    Oh and Joe, I sent you I went to your site and sent you a message.

    Ville, you could try the Reloaded plugin also, I don’t know if it’ll work for you though.

  • Ian

    Daniel, why are you so dismissive? You need to check the facts out before giving the sound advice of “well it works for me so…”

    The plugin you recommend is broken for wordpress 2.6

    If I were you I’d check your error logs just to make sure your site is not affected.

    There is an alterantive plugin that does exactly the same thing called “Custom Query String Reloaded” and it works just fine on WP 2.5.1 and WordPress 2.6.

  • Joe, Web Design

    Well, the good and the bad news is….

    I deactivated everything except CQS. The error continued to display at the bottom of the page.

    I guess that leaves me with my answer. It has to be something to do with the actual database. I must mention that this was a very old WP install (1.5.*) before the upgrade and it did run a hitch concerning the categories.

    I guess I will just customize the looop and do it the hard way for now.

    Thanks.

  • Daniel Scocco

    @Ville and Joe, it is working fine here both on 2.5.1. and 2.6. Make sure it is not just clashing with another plugin you might have installed.

  • Joe, Designer

    Custom Query String 2.7 doesn’t seem to work with WordPress 2.6

    An error is produced at the bottom of the category pages. Deactvate the plugin and the error goes away.

    The error is

    wp_categories’ doesn’t exist for query SELECT cat_ID FROM wp_categories WHERE category_nicename = blah blah blah

    Anyone have a solution?

  • Ville

    It’s the K2 (currently testing RC6) that causes the trouble. When the default theme is in use, the problem goes away. Unfortunately I really like K2. Any chance the plugin could be made to coexist with the most popular 3rd party WP theme? 🙂

  • Ville

    I’m having a problem with Custom Query String, WP 2.5.1, and K2 RC6. If I define “is_home 1 posts date DESC” and “is_archive 1 posts date DESC”, the home page shows one post, but clicking on the “Older” link above the article produces and archive page with as many posts as defined at Settings > Reading > Blog pages show at most (which is 10 by default). The link above the article shows the number of pages as if each message would be displayed on its own page (27 in case of the blog I’m working on), but since the archive pages are not affected by the is_archive custom query string, the content runs out after three archive pages, and on the fourth page (4 out of 27) a “Not Found” message is displayed.

    Seems something has changed in WP 2.5.1 or perhaps K2 adds something to the mix. It would be great to see the issue fixed as this would be otherwise a perfect plugin!

  • Europasobreruedas

    Thank you, I have finally found what he was looking for and it works perfectly. Thanks again and a greeting

  • Bertrand

    Hi,

    I’ve got a strange trouble.

    Everything seems to word perfectly (8 posts on home, 15 on others pages) but in fact, it doesn’t display june posts… So strange, does anyone meet the same trouble or have a solution ?

    Thanks !

  • Bertrand

    Excellent plugin Daniel. That was exactly what I needed so thanks a lot 😉

    Bertrand (from France)

  • Ducked.nl

    Thx a lot for the update! Is it also compatible with WP 2.2.x ?

    See it in action here: http://www.ducked.nl

    Grtz, Andy

  • Daniel

    This may be of topic.

    But I am looking for this wp plugins:- Different Sidebar by Categories & Sub-Categories

    Is it available? Can’t find anywhere.

    Reasons for this feature is that I would like start a generic wordpress blog.

    Generic means no restrictions on the topics. It could be politic, sports, marketing, business… anything on earth and beyond.

    As such, i would like to have different sidebar by categories and subcategories.

    For example, in politic category, I may have different blogroll to the one in sports category.

    It should be opened for everything that could be found on sidebar and not resticred to blogroll.

    I see this as a very useful feature to maximize a blog relevancies as well as the advertising dollars.

  • Polliwog

    wow. I’ve been searching for hours for the answer to this problem and I find the solution here, where I should have looked in the very first place! Thanks so much Daniel. Your blog is such a valuable resource.

  • Rolando

    Dang, too cool, thank you!

  • inspirationbit

    That’s a useful plugin indeed. Thanks.

  • Daniel

    Rory, I just posted an article with an answer to your question, you can read it here:

  • Everton

    now that is a useful find – thanks. Will implement at the weekend

  • Amit Karmakar

    Been using this one for about 2 odd years, and its priceless!!!!!

  • George

    Great find Daniel! I will have to check that out. I have been wanting to increase the number of posts in my archives for a long while.

    Thanks,

    George

  • Rory

    Is there a hack which forces partial posts, so that the whole post doesn’t show? That’s a whole lot of scrolling if you set it to 10 or 15.

    Great plugin, by the way.

  • Daniel

    Installation was really smooth also, one of the best plugins I have played with.

  • Anthony Baggett

    Great plug-in, and a new one to me. Thanks……..downloading now.

  • Adrian

    Solid! Thanks for the heads up. Great blog, useful.

Comments are closed.