WordPress Plugin – Custom Query String – UTW Edition

This is the first release of this modified “classic” WordPress plugin and is based upon the original Custom Query String by Matt Read which has been looking for a permanent home for a while.

It contains some simple modifications extending the operation to include the UTW is_tag() function.
The changes made are not unique, as they are the same as have been described on a number of Non-english language blogs such as 082Net – a little hard to find if you don’t speak Korean, and as I have found in the past, if hacks are not provided as a distributable final version, very few people use them.

This plugin is intended to be used in advanced linking stuctures such as those described in WordPress SEO Masterclass For Competitive Niches

Rather than blocking duplicate content pages, they can be used to your advantage, but as customized landing pages and a method of channelling “Google Juice” away from pages that are receiving the majority of links, to pages that you wish to rank well, and also to your homepage to enhance monetization.

This plugin allows you to modify the default number of posts displayed by the WordPress loop before it creates a new page.

Not Just For SEO

There are all kinds of ways this plugin can also be used for aesthetic appeal and improved navigation.

It should be noted that this is a totally white-hat solution that even Googlers would approve of, as it is frequently recommended these days that sites should be developed to have a wider footprint rather than a deeper one.
It is one of the best solutions to minimise supplemental results on WordPress which are typically from a lack of PageRank, and not as many assume, duplicate content.

Full details and new permanent home for Custom Query String

A couple of additional notes in passing.

It is possible to use the original plugins (which was up to version 2.7) with UTW, but it involved jumping through a few unnecessary hoops which would decrease adoption and also prevent a number of useful linking structures.

This plugin was really in need of a home to ensure that people download a fully working version. Many links are broken to the original, and those that exist are to older versions.

As my readers appreciate, I just tinker with code, thus if extensive modifications are needed with the release of WP 2.3, I might need to strong-arm a friend into helping me manage the programming.

That being said, I am quite capable of supporting the plugin, and explain how it can be used in various ways, which is often more time consuming than the actual coding.

Whilst my advanced WordPress SEO tips might look a little daunting, Custom Query String is actually very simple to use.

Just install it as a regular plugin, go to Options >>> CQS and set up declarations for categories and tag pages, and date archives if you use them (most installations have them somewhere)


There are a few versions of CQS now available for WP2.3+ including Custom Query String Reloaded

I have some additional changes I still want to make with my own version

Liked this post? Follow this blog to get more. Follow


  1. says

    I keep getting a corrupted download, even if I delete, clear cache and try again. Also tried IE to make sure it wasn’t staying stuck in my Firefox cache somehow.

  2. says

    Hi Gregg

    Sorry about that, just created another archive and uploaded it – it now downloads correctly and I have no idea how the first was corrupted, file sizes were identical.

  3. says

    I opened downloaded file with text-editor and it said :

    Warning</b>:  fopen(CustomQueryStringUTW.zip)........

    seems like download error message.

  4. says

    Lets try a direct link, I have just tested the file on the server.


    082Net – the plugin itself is effectively the same as version 2.7 with the changes you and a few others posted around a year ago to work with UTW.


    I tested downloading from multiple servers and creating new archives with the same and different file names, and was still getting errors through the download manager

    I then changed the archive with a small addition to credits, and the problems seem to have cleared up.

    If you have problems with the download manager link, I am leaving this link above, but it should now work.

  5. says

    Forgive me if this is a stupid question….but I have installed this plugin, made some custom queries in options, but it’s not having any impact on the site. Is there something else I’m supposed to do? I have read everything I can find to explain it, but nothing gives me any more instruction. My aim is to show all my posts in ASC order every time they appear. I have made CQs for each category, and for is_home, is_archive and is_index. You can look at http://www.familyhistorians.org and try clicking on Geracitano or Piscioneri — you’ll see the posts show up in default descending order, not in ascending order. All posts were written on August 18, so it may not be obvious, but it should begin with “Geracitano Family Research Begins” and end with “Finally, we arrive at Geracitano”. Any help?

    • says

      Very strange

      I just tested my SEO category with ASC set to -1 as the number of posts. The last 3 items also appear on my front page currently, all posts done the same day and now appear in sequential order.

  6. says

    Patrick it is going to be patched very soon, I had hoped to already have it done by now, as it is only a simple thing.

    The modification is very simple, the hard part is actually making sure everything uploads correctly to the repository such that there are branches maintained for both 2.2.3 and 2.3

    I am traveling currently, as I have been for the last 10 days, my time is limited.

    A quick patch was posted in the support forums, and that should work though I haven’t yet checked how tag pages are being handled

  7. says

    Hi Andy: Below is a copy of a help request I posted on the WordPress Support forums. I have since been told that your CQS plugin can fix my problem. Unfortunately, I guess I am not quite geeky enough to understand if this is correct from reading the above information. :-)

    Can I indeed use your plugin to fix the category links in my sidebar?

    Thanks – Will

    I have my number of posts to display on blog pages set to 6 so as to only show the full text of the latest 6 posts on my main WordPress blog page.

    The problem is that is you hover over one of the categories in my side bar, the link title says “View all post filed under…” But when you click the link, just like on the main blog page, only the latest 6 posts are displayed, not all of them. The theme is using ?php wp_list_cats.

    I can not figure out how to get the category links in my sidebar to display “all” posts in the category and not just the latest 6.

  8. says

    Will I got back earlier than I thought, on Saturday rather than Monday.

    CQS does the job, as you will see from my own categories.

    A good example of the power is my SEO category which I show in date order, so you get to read the oldest first.

    The idea of the plugin seems a little scary, but the interface is actually very easy to understand once you start playing with it.

    Also for anyone looking for a quick patch if using WP2.3 a couple of people have posted what seems to be the obvious fix though I need to check this with tags


  9. says

    Thanks Andy! It is a little scary but it is getting close to Halloween so I’ll just deal with it. I am still on WP2.1.3 but as more and more of my plugins become compatible, I am probably soon to go through the process of upgrading to 2.3.

    If I run into any trouble getting CQS set up to correctly display category posts, I’ll run screaming back here.

    Thanks again.

  10. Stephanie says

    I love this plugin, but it is not compatible with WordPress 2.3. The wp_categories table has changed to wp_terms, I think, and a few other changes.

  11. says

    i got error when adding condition is_category to show 10 post

    WordPress database error: [Table ‘mydatabase_mydatabase.wp_categories’ doesn’t exist]
    SELECT cat_ID FROM wp_categories WHERE category_nicename = ‘categoryname’

    how to fix it

  12. says


    This plugin is great… A few quick questions though..

    1. Under Category-Condition… All of my categories are listed but they are not in alphabetical order… is that normal?
    2. Do I have to set -1, Title, ASC for every category (i have them broken out by food cuisine) or is there one fix that can cover all categories?
    3. I have a search function on my page and I’d like it to also show results in alphabetical order by post title. I’ve tried using the Query-Condition for is_archive, is_search, and is_category however the searches still appear to be in chronological order. Any idea how to fix that?

    THanks for the help


  13. says

    Hi Andy,

    Thanks for the reply. Fundamentally, your version works. In fact I noticed that my 3rd problem is actually working. I installed the newer version and problems 1 and 2 still persist.

    Any advice?


  1. […] WordPress Plugin – Custom Query String – UTW Edition | Andy Beard – Niche Marketing Plugin de WordPress para modificar el string query con variadas opciones (tags: wordpress plugin plugins query webdev) Archivado en: Links Diarios   |   Etiquetas: No Tags. Search […]