If you’d like to re-arrange the order that WordPress displays posts this plugin might help.
With aStickyPostOrderER you can customize the order of appearance of posts per category, per tag – or over-all – in a WordPress (versions 2.3+) blog. Useful for using WordPress as a Content Management System (C.M.S.).
NB! This will only work with WordPress 2.3+!
Download
Downloads and latest version now via the official WordPress plugins repository.
aStickyPostOrderER 0.2.2.2 Beta (22 December 2007) – This latest beta version includes the ability to set meta-stickiness, i.e. you can specify that post from a specific category or tag, or a specified number of posts of same should appear before or after the sorted posts, or after everything else.
Wish-list
In future I might add these abilities:
- to have stickiness expire at a certain point in time and such,
- to also order per tag done
- specify CSS selectors or custom code insertion to identify ‘sticky’ posts
- and have some auto configuration options etc.
- to propagate order set for parent categories to child categories
- set entire category sticky etc. in beta
- order-by-day and/or order-by-month etc. (Good idea, Thanx Mike!)
Ideas and requests most welcome!
Change Log
- v0.2.2.1 – 22 Dec 2007:
As described above, implemented the meta-stickiness functionality, bit more clean up of interface. - v0.2 – 18 Dec 2007:
Lots of stability improvements and as well as the interface elements for meta-stickiness – which when implemented will allow you to specify that you e.g. want the last 5 posts in a specific category(ies) or tag(s) to precede everything else, or move an entire category right to the ‘bottom’ and some stuff in between – more detail when I release the next version (hopefully with that part working. Special thanks to Alvise Nicoletti of for a significant amount of testing issues related to using the plugin with complex nested category structures – also for the great review of the plugin he’s published. - v0.1.7 – 2 Dec 2007:
Fixed bug in MySQL that created listing errors in some cases for some blogs that had been updated from previous versions of WordPress. - v0.1.6 – 28 Nov 2007:
Adds ability to order posts per tag and improves interface showing no. of sorted posts / cat. or tag. - v0.1.5 – 27 Nov 2007:
Support for non-default database prefixes.
Not listing empty post categories as options for sorting.
Show name of the category being sorted while sorting. - v0.1.4 – 22 Nov 2007:
Fixed the creation of the database table at activation of the plugin. - v0.1.3 – 21 Nov 2007 :
Modified DB structure to eliminate errors reported associated with ambiguous field names, changing title to aStickyPostOrderER.
Background
I created this plugin to solve the cahallenge posed by non-trivial ordering of posts when using WordPress as a Content Management System(C.M.S.) at David Krut Publishing.
There we use a single WordPress install to run both the news and blog sections as well as a bookshop catalog – for news items the default reverse chronological order is perfect but in the case of books there are issues other than date of uploading to the site that should determine the prominence the particular ‘post’ about a book is given on the site. This plugin allows manulally configuring the order posts appear in when viewing a specific category – with ordered posts apearing first followed by the rest in their usual order without braking the default WordPress pagination.
Sites that use aStickyPostOrderER
If you use aStickyPostOrderER please pop me an email saying so with your URL (along with any praise you’d like to include:) to andre@pixelplexus.co.za and I’ll link to your site from here.
- Get Rich Geek
- Credit Cards AU
- Lake Garda Improvement Association (LGIA) Web Site
- Patent-Your-Inventions.com
- You Pick the Sermon
- Nokao, photography, web developement
Donations & Punting
Please consider making a donation towards my hosting

and/or giving this page a dig:
How To
- Unzip and place the ‘aStickyPostOrderER’ folder with its content in the WordPress plugins directory.
- Activate on the admin panel’s plugins page.
- Click on Manage, aStickyPostOrderER.
- Click on the name of a category or tag you want to order.
(Those with fewer than two posts are not displayed) - Posts in that category are listed, each with a text field to the right of it.
- Type a number into that field to make the corresponding post appear in that position relative to existing sorted posts, e.g. 1 to make it appear at the top, if there is already a post assigned to that position the sorted posts will be shifted up.
- To remove a sorted post from the sticky list, send it to position 0 (zero).
- Post that are not sorted will still appear in the default order after the sorted posts on the blog’s front-end.
Known Issues
- Themes that execute their own MySQL queries may not (read ‘probably won’t') show the posts in the sorted order. A good way to test is by using the Default theme and comparing results.
- There were various issues with previous versions that affected especially blogs with content that had been upgraded from earlier versions of WordPress, please use the latest version of the plugin.
Sorry guys, I obviously still have a few things to learn about the whole subversion business, turns out I’d gotten some old code mixed with the latest code thus the errors reported on fresh installs of ASPOE 0.2.2.2 to 0.2.2.3, the very latest version aStickyPostOrderER 0.2.2.5 fixes all those issues as far as I’ve been able to test on various setups. Thanx for the head-ups!
A
Hi, This error remains.
WordPress database error: [Table 'golfs_wrdp1.wp_croer_posts' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_posts.*, wp_sticky.sticky_status , wp_croer_posts.post_rank IS NULL AS isnull FROM wp_posts LEFT JOIN wp_sticky ON wp_sticky.sticky_post_id = wp_posts.ID LEFT JOIN wp_croer_posts ON (wp_posts.ID = wp_croer_posts.post_id AND wp_croer_posts.cat_id = 0) WHERE 1=1 AND post_type = ‘post’ AND (post_status = ‘publish’ OR post_status = ‘private’) ORDER BY isnull ASC, wp_croer_posts.post_rank ASC, (wp_sticky.sticky_status = 2 AND wp_sticky.sticky_status IS NOT NULL) DESC, DATE_FORMAT(wp_posts.post_date,’%Y-%m-%d’) DESC, (wp_sticky.sticky_status = 1 AND wp_sticky.sticky_status IS NULL) DESC, DATE_FORMAT(wp_posts.post_date,’%T’) DESC LIMIT 0, 10
Thanks!!
Great plugin! Would love to see some options to change the way posts are ordered by default, such as ascending/descending, chronologically, alphabetically, etc. Also I think it’s worth mentioning somewhere that the previous/next post links on the single post pages won’t magically be updated to reflect the new post order (though it would be great if you could find some way to do this)!
Hi SuperAnn
Thanx for the great suggestions, the next previous links didn’t even occur to me (I usually write my own templates and very seldom if ever use them) I’m slightly overloaded at the moment but will see about expanding the options and features soon.
By the way love your site, especially your bio and your music ain’t bad either :-)
Best.
the great plugin!!!
Why not consider using UI SORTABLES like http://docs.jquery.com/UI/Sortables ? It would be very functional.
Thanks
Pingback: AStickyPostOrderER_Wordpress plugin
I am still getting the Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /htdocs/www/wp-content/plugins/aStickyPostOrderER/croer-listcats.php on line 38.
When I look at the tables that are created for this plugin, they are empty, should they have populated at ‘activation time’ ?
Thank for any help… this looks like a great tool, i hope I can get it working
–Mike
nice plugin.
thanks..
Pingback: Cathie Toshach » Redesign Launch
Pingback: hello/bye » Things To Do
Pingback: 华天动力OA办公自动化系统官方博客网 » 华天动力官方博客建站心得 -
I’m running into an issue;
Currently i can sort subcategories perfectly, when i sort the parent category the posts remain unchanged on the site (they do show sorted in the plug-in however).
I am using ver. 0.2.2.7 of the plug-in and ver. 2.3.3 of wordpress.
Thank you for any help and for the great plug-in!
Pingback: WP as CMS - posting without chronological order « Feet up, eyes closed, head back
A really great plugin, and exactly what i’m looking for…
unfortunately I’m not able to handle it the way i want it…
I’m trying to have one specific post at the bottom of the main index page on position 10 …
is there a way to achieve this?
Thanks and Cheers
Tom
Pingback: Favorite Wordpress Plugins - Wise Bread Forums
Does this also sort the order of the next/previous links or only the category list page?
I’ve got it showing the category list pages correct, but the next/previous are out of sync with that. Did I miss something???
MotherFury (& SuperAnn): the next previous links issue is something I still want to look at – just literally haven’t had time to :-(
I suspect that it should sort if you use the default WordPress pagination, but some themes do create their own MySQL queries for next and previous posts in which case it wont work (the plugin just ads some extra conditions to the normal WordPress MySQL request) – if you sent me your theme’s archive.php file I should be able to tell from that if it creates a different query.
A
PS. sticky posts won’t show up on all pages, if anyone wants that please let me know – I could make a plan in the next version – but I suspect the other sticky post plugins allready facilitate that.
Very great plugin, Andre. I just can’t figure out if it can work interacting with customized ‘query_posts’: I use it to offset posts and give different style rules to (for example) the first two posts since your plugin leaves post code intact, but stickiness then doesn’t work coherently.
Thanks for your work.
Pingback: Plugins used | quirksmode
Pingback: WordPress als CMS -WP Plugins - für jeden Admin ein must have.
This is the bomb. Thank God it did not take me long to find this valueable plug. AndreSC, you are the MAN.
Thank you.
Great plug-in — been looking for something like this for ages!
I have it working great on category pages in main loop, but can’t get it to work with any sidebar loops. Have tried every methods I can locate. This seems standard for pulling multiple loop info and should pull ID info, but doesn’t work. Only stays in descending order. Any suggestions?
Any clues on cause or solution?
LAH
Did you get the code I included with last comment–didn’t appear in field whne message posted? Thanks again for any input.
LAH
hi, the plugin is nice however it does not work, i think this is because of other plugins that i have for example i am using advanced category excluder and when i activate this plugin i get “Sorry, no posts matched your criteria.” on the main page
i am using wp 2.3.3
Thanks Andre! You are a lifesaver. This plug-in is awesome.
One suggestion would be to use pagination when selecting the post order. I’ve got over 7000 posts, so it takes a very long time for the page to load when I’m selecting the post order.
Nonetheless, this is an awesome plugin!
Is there any chance this plugin will ever be able to alphabetize the posts, and use that for sort order?
Hi JC,
Nice plugin.
However, I want to make a post appear as the 2nd post “overall” on the blog homepage.
However, when I put the number “2″ in the “send to” box, the post always defaults to the number 1 position.
How can I simply make a single post always appear as the 2nd post, without having to re-order all the other posts every time I add a new post?
I’d be happy to contribute if I can get this functionality!
Best Regards,
N~
Sorry Andre,
In the post above, just so you know, I’m using WordPress 2.3.3 with the default template.
Thanks!
N~
I upgraded to WordPress 2.5, and am very sad to see that this seems to have been broken. Any chance it can be fixed?
Kudos anyway for a great idea.
Hi guys, I ‘ve been trying for a while now to get rouud to fixing up a new version, hopefully tomorrow
Wonderful, I have been looking for a plugin like this for years. It’s a pity I have already upgraded to 2.5 before finding out about it. But regardless, this seem to be an exceptional piece of code, we can’t thank you enough!
Hey
Thats a great plugin.
But I cant use it :( , I need a plugin which can make a sticky for a specific category.
Like for adobe Photoshop , sticky this post : “What is adobe photoshop ?”
and for PHP , sticky this post : “What is PHP ?”
can you do it please?? if yes, then please let me know VIA email.
Thanks
Hi.
I would like to contact the person who has made the Site: http://cr.editcards.com.au/
Thanks in advance and kind regards.
Hi
Any news about an upgrade for 2.5?
Would it help if some of us wannacontinueashappy users took you for a round of beer? I’m a bit eager on this…
@ Bilai – I believe this is just how I use this plugin (building dolcevita.no/wp – category menu on left (Italia rundt))
Thanks,
Thanks for the great plugin, Andre.
As Stephen G. said above, I can’t get it to recognize sorting on parent categories. Works fine for the child cats, but the parents do not sort – just ID order desc (well date order, really). Even if I remove the sort from the child cat the parent still doesn’t sort.
I didn’t see this in the list of know issues or plans, but also didn’t see you comment on it, so I don’t know if I’m missing something or if this is a know problem.
Anyway, thanks again!
Pingback: The Best Blogging Software (WordPress) + The Top 60 WordPress Plugins | Midas Oracle .ORG
Pingback: Scott Bradford: Off on a Tangent » Blog Archive » WordPress Plugin Role-Call
Guys, I’m sorry, I promise soon!!!
@ Kjetil, probably better to hold those beers till after its fixed, wouldn’t want to go near the code on a few drinks, might not escape again :-/
All of that said if someone else wants to dig through the code to issolate the issues, I’d would not be offended, if they can make sense of it – I’m feeling like a dog here :-( and can hardly find the time to, uhm, blow my nose and such
For what its worth there are some 2.5 sites running it without any issues, notably the dkp that I built it for originally, so it might just be theme related.
When you talk about parent cats not sorting, do they not soert in the admin or on the front-end?
If its in admin try this,
in croer-transact.php, change the code to read:
//insert new$count=0;
foreach($c_new_inserts as $c_pid => $c_pos) {
$count++;
$sql= "INSERT INTO ".$wpdb->prefix."croer_posts (croer_id, post_id, cat_id, post_rank) ".
"VALUES (NULL, '$c_pid', '$croer_cat', '$count')"; // $count was $c_pos
//echo "
insert sql: $sql";
$result= mysql_query($sql) or die("errr:".mysql_error());
}
//
?>
Pingback: WordPress Plugins - WordPress 插件列表 11月27日 - WordPress中文站
sorry to hear your feeling ill
any news on update.
is it theme related or is a general issue?
i have the same prob.
posts in parent categories do not order.
plus, in the rearrange all posts i have now empty slots. meaning a position is occupied by nothing. its as if it did not refresh the order after a post was deleted or something.
one more thing is that after working on a test server and arranging posts i imported the entire database to live and the links remained the ones of the test servers.
i have indeed upgraded to 2.5 recently and this appeared only after.
if u check the blog you will see its about a peace and conflict timeline in sri lanka. so ordering is crucial. your plugin made this website be a reality. please help me out. its for a good cause :)
thanks,
C
Great plugin, tnx a lot for it! :D
There is something I tried to do but it can’t. I’d like to set a post to a specific position.
For exemple, in a blog set to show 10 posts on each page, set a post to always stay on the 4th position, independent of new posts posted.
Or I post a new post but but don’t want it on the first page, so I set it to 12th position, forcing it to stay on the 2nd position.
We really like the plugin but is there a way to allow the user to decide whether to view the most recent posts also?
Ben
any news on why it doesnt order the parent category posts in wp 2.5.1? it shows as ordered in admin but the front end is incorrect.
here’s the problem: http://pact.lk/period/1950s/
anxiously waiting for a reply/fix/upgrade/anything :)
thanks in advance,
C
Hiya guys, new version just uploaded:
2.2.8 (2008/04/28)
* Fixed parent categories not showing order in WordPress 2.5.1
* Fixed weirdness previously resulting from removing posts from being ordered
* Created index.php page (noticed content of plugin folder indexed on Google :-( )
WOW!
Most awesome plugin!
Have PayPaled a small token of my gratitude…
Cheers
Thanx – much appreciated!
YES! You release the version I need, the day before I need it. You effin rock Andre, and so does ur plugin.