WordPress Guy

WordPress Guy designs and develops WordPress themes and plugins. WordPress Guy teaches you WordPress stuff.

Last week I was having a really hard time ordering the categories in this blog’s header as WordPress only seems to allow to order by name or by ID. That’s why I came up with the Category Order plugin.

Description

The Category Order plugin allows you to easily reorder your categories the way you want via drag and drop. It doesn’t require a special widget or anything, just install and reorder.

Requirements

This plugin requires that you use at least WordPress 2.3, although it has only been tested on WordPress 2.5.1

Download

Category Order 1.0.3

Installation

  1. Download the plugin and expand it.
  2. Copy the ‘category-order.php’ file into your plugins folder (wp-content/plugins/).
  3. Login into the WordPress administration area and go to the Plugins page.
  4. Locate the Category Order plugin and click on the activate link
  5. That’s it, now you can go to Manage » Category Order and reorder the categories the way you want.
  6. If you use wp_list_categories(), make sure you don’t specify an order (e.g. wp_list_categories(’orderby=count’);).

Version History

  • 1.0.3 - If no order is specified, categories are ordered by name
  • 1.0.2 - Fixed a problem related to PHP 4
  • 1.0.1 - Fixed a problem where the plugin wouldn’t work properly if you had installed WordPress in a subdirectory
  • 1.0 - Initial Release

Donate

Support further plugin development by making a small donation:

donate

Blog reactions

Comments

  • ... from here 23) Category Order- The Category Order plugin allows you to easily reorder your categories the way you want via drag ...

  • ... Category Order, a drag-and-drop way to organize the order categories appear in, allowing me to set the order of the sections in the menu bar. ...

  • September 21st, 2008 at 9:23 pm

    I am using this and for some how the plugin has no effect on the order. I am missing something? thanks for any help.
    function sandbox_globalnav() {
    $menu = wp_list_categories(’title_li=&sort_column=menu_order&echo=0&depth=1′);
    $menu = ” . $menu . ”;
    $menu = ” . $menu . “\n”;
    echo apply_filters( ‘globalnav_menu’, $menu ); // Filter to override default globalnav: globalnav_menu
    }

  • September 26th, 2008 at 4:55 pm

    Wicked!!!! Awesome stuff…you’ve made my day. Great job!
    Steve

  • ... Category Order 1.0.3作者: Wessley Roche. カテゴリ順番を自由に調整。AJAXで軽快動作。作者サイトには、WordPress2.5.1の環境を書いたが、こちらは2.6.2でも無事動作している。同様に、「My Category Order」もあり、試していない。 ...

  • September 29th, 2008 at 4:23 am

    holy cow, that was easy. i was completely shocked that category order isn’t an option in WP yet, like page order is. but i figured there was a plugin somewhere for it :) thanks!

  • clyde
    September 30th, 2008 at 7:45 am

    Now why can’t all plugins be as well coded as this one?
    Simple, easy .. great drag-n-drop interface for newbies
    Thankyou!

  • ... Category Order — Offre une interface pour ordonner les catégories et les sous-catégories par glissé-déposé dans l’ordre que vous désirez. ...

  • October 11th, 2008 at 9:48 am

    It’s a good plugin, thanks!

  • ... 另外:还有一个插件Category Order,其要实现的功能完全一样,本人没有试过,据说比较使用更加方便,感兴趣的朋友可以去看看。 ...

  • October 15th, 2008 at 12:34 am

    This is GREAT! Thank you!!! Exactly what I’ve been looking for!

  • October 15th, 2008 at 3:34 am

    Your plugin is perfect for post categories, but I am having a terrible time finding something like it for link categories. Really, I’d love it to be JUST like this! Do you know of anything (preferably NOT a widget), or is there a way to modify this for link categories?

    Thanks!

  • October 22nd, 2008 at 3:13 am

    Awesome plugin! Just what I was looking for!! Thanks!

  • November 19th, 2008 at 1:04 pm

    worked great!!
    tnx :)

  • Bassman
    November 19th, 2008 at 9:44 pm

    Hi, this plugin is really good. Works smooth and nice; however, how can I show the ordered categories if i use mysql statements?
    this is what I’m actually using:

    get_results(”SELECT $wpdb->terms.term_id AS id, name, description from $wpdb->terms INNER JOIN $wpdb->term_taxonomy ON $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id WHERE parent = ‘$cat’ “);
    foreach($categories as $category) :
    ?>
    …blabla

    Should I put some “OrderBY”; don’t think so, but…

    Sorry, I’m really new to all of this.
    Another point, there is a column at the term_relationships table called “term_order” which (at this point in my WPsite) happens to be all 0’s. Can’t it be used to reoder the categories? I have no clue…

    Thanks for your time and for your great job.

  • December 2nd, 2008 at 7:09 pm

    Fantastic! Couldn’t be more simple. Exactly what I was looking. The only thing is the “Save” button that says “Order Categories” took me a few times to realize it was the save button. But very very minor criticism. Does this change the ID numbers? So if we rig up code that relies on ID numbers staying the same, should we be wary of changing things? I guess I’m not privy enough to WP functions

  • Lisa
    December 5th, 2008 at 7:24 pm

    Hi,

    Is there a way to make this plugin work for blogroll categories? Or do you know of another plugin for that?

    Thank you.
    Lisa

  • ... Category Order 又一个分类排序插件,在后台通过拖放即可实现分类的重新排序。 ...

  • December 9th, 2008 at 3:38 pm

    Brilliant!
    Quick and easy - should be in WP as standard.
    Thanks!

  • Hisham
    December 18th, 2008 at 7:50 am

    I can’t C it in WP 2.7 how and from where can I use it in 2.7??

  • ... Sista Wordpress-tipset för dagen gäller den ordning som kategorierna visas i när man använder wp_list_categories. Det finns möjlghet att sortera efter namn eller ID, men vill man ordna efter eget tyckte rekommenderar jag tillägget Category Order. ...

  • December 27th, 2008 at 11:42 am

    thanks for work, I was searching for such a plugin for a long time

  • December 30th, 2008 at 11:09 am

    Absolutely perfect. Many thanks bro!

    @Hisham - It is located within the posts index on your left navigation bar when you are in your admin.

    @Simon - I totally agree, it should be standard!

  • nico
    January 1st, 2009 at 4:16 pm

    Nickel ! Merci beucoup pour cette fonctionnalité, simple, efficace et vraiment pratique ! Very good job guy !
    Happy new Year 2 U ! :-)

Your Comment