aStickyPostOrderER : Plugin To Change WordPress Post Order

The axis of evil in South Africa is Media24, buy viagra Educor, physician ICG, Damelin, & Intec’s opportunistic irresponsible profiteering.

Media24′s diploma circus Media24 Damelin College Intec NQF National Qualifications Framework correspondence courses South Africa South African
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, pestilence 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, more info i.e. you can specify that post from a specific category or tag, rheumatologist 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.

Donations & Punting

Please consider making a donation towards my hosting
Donate towards my web hosting bill!
and/or giving this page a dig:

How To

  1. Unzip and place the ‘aStickyPostOrderER’ folder with its content in the WordPress plugins directory.
  2. Activate on the admin panel’s plugins page.
  3. Click on Manage, aStickyPostOrderER.
  4. Click on the name of a category or tag you want to order.
    (Those with fewer than two posts are not displayed)
  5. Posts in that category are listed, each with a text field to the right of it.
  6. 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.

265 thoughts on “aStickyPostOrderER : Plugin To Change WordPress Post Order

  1. Hello! Your plugin is a must-have ^-^

    As always, I only remembered to come thank when I had a request…

    Core’s “Recent Posts” widget is also listing sticky posts. Since it’s meant to show lastest post, I believe sticky ones shouldn’t be shown there. Could you add an option to disable sticky posts on that widget?

  2. Pingback: viar em es | | re-order your posts by specific category with aStickyPostOrderER

  3. Hi.

    It’s possible to make a query_posts without the aStickyPostOrderER cusomized order of “Order Index, Archive and Search Results Order”?

    In other words, I need to make a query of the lastest news, but I also need my aStickyPostOrderER customized order on my homepage.

    I’ve seen that some users asked the same question but I haven’t seen any good answer.

    Anyway, thanks for this amazing plugin!

  4. Pingback: WordPress Plugins that Extend CMS Functionality : Wordpress Arena

  5. Hi,

    I´m very happy using ASticky… anyway, I´ve a problem:

    We use to publish 15-20 entries that change everyweek because we remove some items and add new ones, this procedire leaves empty records on the ordered list.

    in “Editing order of post in Index/archive view” page I’ve a list of 30 records but many of them empty. Also in next sorted record list I´m going to 187 empty records… because everytime we add a entry, it´s been placed after last used cell.

    Even if a move all records to first places, the 187 record will still exist.

    sample:

    How could I cleanup the list and keep only the 15-20 entries in one 30 records pages ?

    Is this list of empty records growing and growing.. I´m doind something wrong ??

    thanks…

  6. The lastest version allows overriding the customised order, use”…?aspo=vanilla” in the url, or if you created a listing with query_posts add aspo=vanilla, eg. ‘”…query_posts(‘cat=13&showposts=10&aspo=vanilla’);…”

    Also, identified the issue with posts not showing up in certain custom listings on some themes – has to do with WP_query peculiarities. From this version they should show up without custom ordering in lists created with WP_Query

    h.t.h.

  7. This plugin literally saved my life with my site Stylozero.

    While it did the job for me with sorting posts in specific categories for my portfolio, it does not seems to work out for the featured category, which is called from within a page, with a custom query:

    $featured = new WP_Query(‘cat=10&showpost=6′);
    while($featured -> have_posts()) : $featured -> the_post();

    Is there a way to make it work with such a setup?
    Thanks.

  8. Gianfranco

    Glad it helped. The best is to avoid WP_Query. As much as the codex recommends it in places, it seems inconsistent with the rest of WordPress. If you want the custom order rather use query_posts:
    eg.

      // Get the last 3 posts in the featured category.
      <?php query_posts('category_name=featured&showposts=3'); ?>
    
      <?php while (have_posts()) : the_post(); ?>
        <!-- Do featured stuff... -->
      <?php endwhile;?>
    
    //We reset the loop
      <?php rewind_posts(); ?>
    
    //We build the normal loop that will list out blog posts
      <?php while (have_posts()) : the_post(); ?>
        <!-- Do stuff... -->
      <?php endwhile; ?>
    

    see http://www.catswhocode.com/blog/multiple-wordpress-loops
    and http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_2 if you want to store the normal stuff in a variable

    if there are enough requests to make WP_Query work with the custom ordering I might ‘fix’ it somehow

  9. Thanks André, that worked!

    I didn’t even considered calling a regular loop intead of a custom one (WP_Query).
    But that did the trick.

    Your plugin is great, keep up the good work and further development.

  10. Pingback: Callware.com Website Information

  11. Pingback: WordPress Plugins that Extend CMS Functionality | Web SEO Rank

  12. I think this is a wonderful plugin! However, I figured out that it is causing the author’s name to not be displayed when this plugin is active. So, instead of a post reading:

    By John Doe on 03/20/2010

    the By-line reads:

    By on 03/20/2010

    Do you have any idea what can be done to put the publically displayed name back into a post when using this plugin?

    Thank you,
    Rochelle

  13. On the main admin page for the plugin “=astickypostorderer” is there a way to have the categories be listed alphabetically rather than them be listed by category id number? Currently they are shown as being listed from 1-300 or so.. I have over 300 categories and being able to search alphabetically is much easier to make changes. So basically I’d like the admin page to show the categories by ascending or descending order.. Where in the code on what page would I need to make changes to have the categories listed in alphabaetical order in the admin section?

  14. Pingback: Wordpress: Sticky Post in Kategorien und Tag-Seiten

  15. I’ve installed the plug in and am looking forward to getting it set up however I can’t seem to get to the Manage function.

    I’ve followed the instructions to this point:
    # 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.

    I can’t find anything to click on to “Manage” this plug in. All the Plug Ins Manage page shows for this plug in is the choices to Deactivate or Edit and the Edit link is to edit the code of the plug in, not to manage or set it up. Can anyone help me? I’m sure I’m missing something really simple :(

  16. Your Plugin is fantastic! Thank you so much. Would you believe I tried about four of them yesterday and yours was the only one that did what I needed.

    I have Digg’d you! Donation on the way…I really REALLY appreciate your hard work here! You’ve saved me so much heart ache! Thanks heaps!!!

  17. Pingback: Tim Noonan’s Favourite Accessible WordPress Plugins and his Choice of Thesis as Theme. Screen-reader Friendly blog widgets — Vocal Branding Australia

  18. I’m trying to make this plugin work with WordPress Category Posts Plugin. The problem is that the latter lists its TOC in WordPress’s original listing. Any tips… suggestions at all? I’m so not good with PHP, man. I went through your code 1000+ times and I’m still at a loss.

  19. Your plugin has been great. We are running into a problem with posts still showing up on the sort page after they’ve been moved to a different category. Is there a way to get rid of these ghost posts? Your help would be much appreciated!!

  20. Hi André

    If this plugin allowed me to manually order posts within each category separately (ie. a post that appears in multiple categories is able to have a different position in each), and if this plugin worked for the latest version of WP (v3.04) then I would be a very happy man!

    Are there any plans to implement features such as these?

  21. Great plugin, but I can’t actually get it to re-order posts in a category. Have edited the order of posts and “save and refreshed” but makes no change. I assume I’ve missed something? I’m running latest wordpress with the standard theme

  22. this version can’t work with WordPress version 3.1, please upgrade the plugin to work with the last version of WordPress., Thanks a lot.

  23. All of a sudden my post order seems to have reversed. I’m using your plugin of course and I think it happened when I updated WP the other day to 3.1

    Not sure how to fix this. Any ideas?

  24. Hi,

    I am hoping your plugin will help me solve a lot of my problems…

    When i click on a category on the left navigation: for example Health and Beauty then Hair and Makeup, this then displays all the posts under the category for Hair and Makeup.

    Thats fine, however what I need to be able to do is order them, like Gold, Silver and Bronze. All the posts with gold will appear at the top, followed by Silver in 2nd and finally bronze!

    I need to do this because users will be paying for advertisement slots, and someone paying top wack for a gold package won’t want to see someone with a bronze package above them in the post lists!

    So basically you buy a gold package ad, your sorted/filtered at the top, sliver your 2nd and so on?

    Its just filtering and sorting the results in a specific way.

    Would the plugin be able to do this? And how?

    Really Hope you can help,

    Thanks,
    Paul

  25. Hello your plugin isn’t compatible with wordpress 3.1. are you planning to make an update ?
    by the way THANK YOU for this ultimate solution :-) this plugin is just excellent.

  26. Great plugin… until I upgraded to WordPress 3.1, then suddenly it didn’t order posts anymore. Any ideas?

  27. Great plugin!
    I would like the sticky posts to appear comlete on the category pages and the other posts in excerpt. Any suggestions how this can be done?

  28. Hi,
    I am using Magazine basic theme and am not able to sort the order of posts on category or tag archive. For index page it works fine. Any suggestions?

  29. I love, love the idea of this plug-in and I installed it per your instructions and thought that it was working. But now I’ve discovered that it’s not working. I’ve gone over this time and again and cannot figure out why it’s not. Andre, can you help me troubleshoot at all? Would appreciate it much.

  30. Hi, this plug-in is really great, I’ve been using it successfully for months and my blog can’t live without it!

    However I just updated my WordPress to version 3.1.2 and AStickyPostOrderER seems broken! It doesn’t work anymore…?

    What do I do???

    Thank you so much!

  31. Hi Andre,

    Your plugin solved several problems I was having regarding how I wanted things to show up on my blog and in my content archives. I have used this plugin since March, 2011 and have truly appreciated what it has allowed me to to.

    However, I’ve been having issues with my feed for several months, and after working for two solid weeks with Nick Croft on the Studiopress forum, have found that aStickyPostOrderER was causing my feed to load in reverse order. So only the oldest posts showed in my feed, and none of my subscribers got any notification when I posted new content.

    I’d really like to continue using aStickyPostOrderER, it did things exactly the way I wanted it to, and I do not have the tech chops to implement these changes myself. Please tell me there’s a way to use this plugin while making sure it doesn’t change the feed order.

    Thanks so much,

    Diana

  32. First I would like to say that I think that this a great plug-in, however I was beating my head against the wall wondering why it wasn’t sorting my categories correctly. After some digging I think that I found the issue

    Starting on line 260 you have:
    if (strpos($c_query, “$wpdb->term_taxonomy.term_id”)) {

    what I think you are trying to do here, is if this is has a taxonomy id then use $tmp_catid_str which is set in the line above it, else use category 0 (which is hard coded in the else section a little farther down) What I’m guessing here is that you are trying to do here is check if this is the front page. If so use category 0, else use what was sent.

    My problem is this always returns null (not found) so it’s always using category 0. Which never returns any extra posts to be sorted. On line 259 you check to to see if there is a $current_term_id and if so set the $tmp_catid_str. The solution to my problem was to combine remove line 260, and combine the rest with like 259.

    Here is the resulting code:

    if($current_term_id){
    //echo “if”;
    $tmp_catid_str = ‘ AND ‘.$wpdb->prefix.’croer_posts.cat_id = ‘.$current_term_id.’ ‘;
    $c_query = substr_replace($c_query, ‘LEFT JOIN ‘.$wpdb->prefix.’croer_posts ON (‘.$wpdb->posts.’.ID = ‘.$wpdb->prefix.’croer_posts.post_id’.$tmp_catid_str.’ ) ‘, $c_into, 0);

    } else {
    //echo “else”;
    $c_query = substr_replace($c_query, ‘LEFT JOIN ‘.$wpdb->prefix.’croer_posts ON (‘.$wpdb->posts.’.ID = ‘.$wpdb->prefix.’croer_posts.post_id AND ‘.$wpdb->prefix.’croer_posts.cat_id = 0) ‘, $c_into, 0);
    }

    This results in one less compare and one less strpos. Minor I know, but every little bit helps.

    This works for categories, but I’ve NOT tried with other taxonomy (ie tags)

    Anyway thanks

  33. I can not get my newest posts to show up as the first item in my feed. As you can see by looking at my feed here, my newest content is not showing up in the feed until after the posts that I have stickied with the aStickyPostOrderER plugin.

    Any ideas for a fix?

  34. Is there a way to use this with an auto-redirect? I am trying to build it to where I have advertisements in a category (id=3) and then you play a game and after each round it redirects you to an advertisement, Right now I have it doing random ads, but I want it to go through a sort list and at the end restart.

    this is how it currently is used:
    setTimeout( “parent.window.location.href = ‘/?random&random_cat_id=3′”, 1000 );

  35. Hello,

    I’ve been playing with your plugin for a while, and it was really great.
    I Just found out that it is not working anymore, and I cannot say when that problem occurred since lately I :

    - upgraded to tle latest version of wordpress
    - changed host and php version.
    implemented a new plugin named ‘shortcodes’

    So well, if you have any iodea why it sopped working, this would be really helpful..

    Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>