Q2W3 Post Order WordPress Plugin

This plugin lets you manipulate the order in which posts are displayed.

Requires WP 3.1 or higher!

Q2W3 Post Order is a descendant of a well known AStickyPostOrderER plugin. Because it was not updated for a long time I decided to make an upgrade which could be available from wordpress.org.

The main changes are:

  1. Since version 1.1.0 added ability to stylize ordered posts (see FAQ for details)
  2. Plugin was completely rewritten
  3. Now you can change order of posts on custom taxonomy and custom post type archive pages
  4. Removed Meta-Stickiness options — the plugin became lighter, faster and easier to use
  5. Added support for internationalization
  6. Advanced uninstall
  7. Plugin settings page was moved from Tools to Settings section

Supported languages:

  • English
  • Russian (ver. 1.2.4)

How to install:

Important! if you have AStickyPostOrderER installed — deactivate it before installation!

Then you can use standard plugin installation procedure inside WordPress, or manually download and install plugin.

Frequently Asked Questions

  • How to enable custom taxonomies and custom post types support?
    Open plugin setting page. Look in upper right corner of the screen, there is a Screen Options dropdown panel. There you can enable/disable custom taxonomies and post types.
  • How to stylize ordered posts?
    For each ordered post two css classes are set: q2w3-post-order and q2w3-post-order-{n}, where {n} is post position number.
    Use q2w3-post-order css class to set general style for ordered posts.
    Use q2w3-post-order-{n} to set unique style for specific post position.
    Note! You have to use post_class() template tag in your theme.
  • How to disable plugin for feeds, pages and custom queries?
    You can add a parameter q2w3-post-order=disable to the url.
    For example http://example.com/feed/?q2w3-post-order=disable — that meens your main feed will be sorted in natural order.
    If you use custom queries:


    Array style:

    query_posts(array('cat'=>13,'showposts'=> 10,'q2w3-post-order'=>'disable'));


  • 1.2.8
    Added post date in post listing tables
    Fixed a few more php warnings and notices
  • 1.2.7
    Trying to fix problems with post saving
  • 1.2.6
    Fixed Problem with the update
    Fixed Does not sync the sorted list when updated the post
    Fixed Private posts are not listed
  • 1.2.5
    Fixed Minor coding issue with WP 3.5
    Tested compatibility with WP 3.5
  • 1.2.4
    Fixed a few non critical bugs
    Updated help section
    Added russian translation
    Tested compatibility with WP 3.4.1
  • 1.2.3
    Fixed bug when installed with ClassiPress Theme
  • 1.2.2
    Fixed php warnings and notices
    Post order number now can contain up to 6 digits
  • 1.2.1
    Fixed bug with 404 page on sites with non standard db_prefix
    Checked compatibility with WordPress 3.3 RC3
  • 1.2.0
    Added debug mode.
    Added option which allows Editors to access plugin settings page.
  • 1.1.0
    Added ability to stylize ordered posts.
    Fixed small bug with post ordering in hierarchical taxonomies.
  • 1.0.0
    First public release.


Other Q2W3 plugins:

77 ответов к “Q2W3 Post Order WordPress Plugin”

Please, what is the User Role checkbox that will cause Q2W3 Post Order to appear in the Settings menu? I can see it as Admin, but not Editor. Too many combinations to test!

Thank you!

Hi Max,

Hopefully a quick question — but is it possible to randomise the «unordered» posts?

For example, I’ve got a number of posts on different photographers, with one photographer’s post now appearing at the top of the «Photogoraphers» category page. But I’d like the remaining photographer posts to appear in a random order, rather than by post date. Is it possible to insert the RAND function into the php anywhere for this to work?


Well… try this code (add it to functions.php file):

function photographers_orderby_rand($query) {
	if ( is_admin() ) return $query;
	if ( $query->query_vars['category_name'] == 'photographers' ) { // Change order only for photographers category
		$query->set('orderby', 'rand'); 
	return $query;
add_filter('pre_get_posts', 'photographers_orderby_rand', 1);

Thanks Max,

Should this go into the theme’s functions.php or the global functions.php? It’s just that I’ve tried both, and nothing seems to be working (in fact putting it in the glabal functions.php breaks things).

Also, is there anyway to make any category show the posts in a random order (with the seledcted posts at the top, where required)?

Thanks again,

Of course theme’s functions.php file!!!
Do not modify any WordPress files outside wp-content directory!!!

nothing seems to be working

It’s a pitty!

is there anyway to make any category show the posts in a random order (with the seledcted posts at the top, where required)?

I don’t know out of the box solution for this case…

A quick update.

Managed to resolve this without altering functions.php — and it works for any category:

<?php global $query_string;
         query_posts( $query_string . '&orderby=rand'); ?>

Thanks for having a look though — much appreciated.

Hi Max,
I have installed your plugin, but it does not appear to work. I have tried with the default theme and my theme, and the result is the same: The posts on my front page appear in natural order.
The debug screen indicates that the query is executed correctly and that is returns the posts in the desired order. However, on the site the HTML is generated in natural order, and the q2w3 css tags are not added.

Do you know what that could be? Unfortunately, the site is not yet public. Thanks for your help!


I found a work-around… it does not work if I use the category mode, but it works fine if I sort individual posts. Maybe this is a misunderstanding of how it is supposed to work. When I am editing the sort order for my front page, perhaps category mode does not work by design?

Hi, I’ve installed this plugin to a site I’m working on, but it doesn’t seem to change anything. I see there is some code that needs to be added, but I’m not sure I understand where to add the code.

Using WordPress 3.5.2

There is no need to add any additional code to twmpolate. Where did you get this idea?

Right now the plugin is working with default queries only! May be this is your problem?

Also you may check how it works with one of default templates!

Hi Max I used your Q2W3 plugin back in April 2013 and it worked great for sorting my posts. I’m trying to use it now in October, and it doesn’t seem to be working. I’m still on WP 3.5.1 — I don’t think I updated it since April and still on the same theme. Can you help? Thanks!

error version 1.2.8
When sorted post, show report «nothing found for wp-content plugin Q2W3-post-order post php» and «apologies but the page you requested could not be found. perhaps searching will help». How to fix this error.

Hi Max, so glad I found your site again… I was doing a review of my plugins and wondering what the latest was on AStickyPostOrderER. I am still using your patched version from a while ago because the functionality is still very essential to my site!

But now I see you and Andre have produced a new and better plugin that is (most importantly) supported. And it’s perfect because I’ve just needed a way to simply order the posts within tag groupings and do not need fancy stuff.

So my question is this — when I upgrade from AStickyPostOrderER to Q2W3 Post Order, I saw that I first have to deactivate the old plugin.. Will the new one keep my existing orderings that I already have (stored in the DB perhaps?), or will I have to start over from scratch to replace and re-enter all my post orders?

Thanks again very much for helping save this plugin, and please let me know how I can donate!

Hello, John!

will I have to start over from scratch to replace and re-enter all my post orders?

Yes, you’ll need to re-enter post orders!

Don’t forget to make a DB backup before activating Q2W3 Post Order!!!

OK, no problem. I will make sure to record all my orderings before doing the changeover, so that I can re-enter them with the new plug-in. It will take a bit of time but I will be relieved after it’s all done and I am switched over.

Also I can’t read a lot of the Russian here — is there an easy way to donate to support the new Q2W3 Post Ordering plugin?

Thanks again!

Hi, I’ve a problem qith the plugin. I’ve it installed and running but after choose the position and clicking on Update unsorted nothing happens.
There’s a different thing comparing it to your pictures. In the top, (Sorted:) it appears «no records found».
Maybe it could be that
Thanks for your help

«no records found» means that you have no sortded posts yet. Its ok.

The real problem:

after choose the position and clicking on Update unsorted nothing happens

I don’t know how to fix this without access to your site…

When I turn on the plugin after reordering a few posts, my site loads with a long string of code on the front page starting with this, Query Number: 1

WP Query Object:

object(WP_Query)#1106 (43) {
&array(55) {
string(0) «»

And on and on.

If I turn off the plugin in, my site works fine again. Site is clearskinblemishes.com and theme is Gazette by Studiopress. If you can email me, I can turn on the plugin so you can see exactly what is going on.

This will be a great solution if I can get it to work, I wrote blog post about it at, http://righthandplanning.com/order-posts-within-category-in-wordpress/

This is a debug data. It is shown only for logged in administrator. Try to disable debug mode. Go to plugin settings page, then go to general options page and there turn off debug mode.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Срок проверки reCAPTCHA истек. Перезагрузите страницу.