Update 1/14/2011: According to Dustin Gurley, this still works in WP3 w/ minor modification. Thanks, Dustin.
Update 1/30/06: a plug-in now exists to handle this.
WordPress lacks the ability to specify the exact order that link categories appear in the sidebar. The
get_links_list() function can only order categories by name or id, and this limitation becomes annoying when you create your categories out of order (you can no longer order by id) or want to rename your categories (“Junk” has to appear before “My Favorite Links”).
Here’s how to completely customize the order of your link categories:
- Open up your WP database with a database admin tool (eg. MySQL Query Browser or phpMyAdmin).
- Find the
wp_linkcategoriestable and the row of the category you’d like to appear first.
- Update the
cat_namefield of that row, prefixing the existing name with the HTML comment:
- Update the rest of the rows in the order you want those categories to appear, prefixing each name with
get_links_list() orders categories by name, they’ll be in order by the numbers in the comments, which will be hidden by the browser.
Note that you can’t simply enter the comment within WP because it will escape the greater/less than characters, breaking the format of the comment. For the same reason you won’t be able to change the edited category names within WP without breaking the comments, though you can remove the comments and go back to ordering by name or id.
Maybe someone will make a plug-in to do this from within the WP interface.