If you’re a blogger with OCD you might be interested in my new Category Sort plugin. It simply alphabetizes the category list that gets printed out when the the_category() function is called. Wordpress sorts this list according to category ID, which has always seemed completely random and bugged the hell out of me. Since I’m using this plugin, the categories for this post are “plugins, wordpress” instead of “wordpress, plugins”. This is not that exciting, but it looks nicer. Download it at the plugin page.
My name is Joey Nelson. I'm a web developer living in Raleigh, NC and working with Node.js, MongoDB, Ruby, PHP, jQuery and some other stuff. More about me.
Nice, that’s always got under my skin too!
Awesome! Just what I was looking for. Thanks!
Unfortunately, the link to the plugin page does not work (error 404)
sorry about that, everything should be working again. there was a little bit of a database meltdown recently and that was one thing that didn’t get fixed.
Thanks for writing this plug-in. Very handy.
Since installing it, I’ve found that sometimes one category per post (and only one) is output without a space after the comma, like: “movies, books,tv, music”.
I made a hacky fix for my site (editing the plug-in to add a space to the end of $joined) but I thought you’d want to know about the issue.
Cheers.
hi! I just installed your plugin..but it’s not working :( Please help..
what’s the license? (please cc the reply by email)
i hereby release this plugin under a very liberal “do whatever you want with it” license.
I installed it on the latest wordpress 2.0.5 and it doesn’t work. Help.
Is your plugin compatible with the new 2.1 release of wordpress?
I’ve tried it on 2.1 and it’s working for me.
I just upgraded to WordPress 2.2.2 a few days ago, and this plugin seemed to break the category selector on the Write Post page. I disabled it and things went back to normal. Not sure what the problem is.
It seems the sort is case sensitive. This will mean ‘Z*’ will come before ‘a*’. Was this done on purpose?
Dave
I have that same problem in v2.2.3.
Dave & Dustin,
I haven’t upgraded Wordpress in a while, I’ll try to get this working but time is in short supply right now.
Dustin,
It’s just using PHP’s ksort() function. I guess I never noticed because all of my categories are lowercase! I’ll work on that too.