Reorder WordPress Link Categories

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:

  1. Open up your WP database with a database admin tool (eg. MySQL Query Browser or phpMyAdmin).
  2. Find the wp_linkcategories table and the row of the category you’d like to appear first.
  3. Update the cat_name field of that row, prefixing the existing name with the HTML comment: <!--01--> (eg. My Stuff becomes: <!--01-->My Stuff)
  4. Update the rest of the rows in the order you want those categories to appear, prefixing each name with <!--02-->, <!--03-->, et.al.

Now when 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.

Mp3.com is the new All Music Guide

I’ve spent countless hours digging around the All Music Guide for years now, but it was always frustrating to have to jump over to some music store like CDNOW (long gone) or Amazon to listen to clips, if you were lucky. Mp3.com for a long time was a revolutionary way to get your music out to people (and in typical dot-com bubble-bursting fashion they would pay you and send you cheap branded merch like duffle bags for free) and I’m glad to see the new owners (CNET) have done something good with it. Mp3.com is now the cream of the All Music Guide (bios, reviews, cross referencing and genres) with music clips of almost everything. They’ve struck referral deals with the pay-per-download services to get all these clips (30-sec WMA) and they start streaming pretty quickly on DSL.

Tonight I just dug around in their Freakbeat section and came across this gem of maximum R&B: Reflections by Les Fleur de Lys. They even started pulling off pure pop ala Todd Rundgren (listen to “Brick by Brick”).

Update! 7/13 Apparently the All Music Guide is undergoing a redesign and the new design is a disaster in every browser but IE/windows. The old design was ugly, but at least somewhat usable and, with so much great content, the web design community really gave them a free pass, but to build a clunky IE-only, Windows-only site in 2004 is unforgivable. Mp3.com’s UI is so much nicer that I can’t see going back to AMG for much anymore.

mrclay.org version whatever

Mrclay.org will be officially really messed up for the time being while I move everything into the loving arms of WordPress. I half-heartedly tried this before, but never did anything with the old installation. It was a royal pain converting all my old Blogger posts, but while I was into I added my old mrclay.org posts from when I had the patience to design a fresh look for each one. 100% CSS layout goodness since 2001.

Multiple versions of IE on Win2k/XP

Joe Maddalone, with a little help from Roger Ly, has made quite a contribution to Win2k/XP-using web developers by discovering how to install two older versions of Internet Explorer (5.01 & 5.5) as standalone browsers without altering IE6.0. Particularly, this allows developers to test CSS rendering in these older browsers without installing multiple version of Windows in emulators like VMWare ($300) or Virtual PC.

Roger discovered the last two files needed to truly enable the older HTML/CSS rendering engines (without these the browsers were returning their respective user agent strings, but using IE6’s renderer).

A few helpful additions to Joe’s technique

  • The source installation files are available from http://browsers.evolt.org/: Download IE5.5 and 5.01 (both SP2)
  • I recommend using Power Archiver 6.1 for nag-free archive handling comparable to (and very similar to) WinZip’s “classic mode”.
  • Extract the .CAB files all into the same directory—certain files depend on more than one .CAB file.
  • During extraction it’s OK to let the extractor "overwrite all files".
  • It may turn out that many of the other files are unnecessary as well. We have them running with only eleven, but certain functionality—like the ability to selecting text and type in forms—is disabled).

The resulting browsers, as you’d expect, can be quite buggy/crashy beyond their inherent CSS limitations, but arguably still quite useful. Also keep in mind that this could be considered mild Windows hacking and Microsoft could potentially refuse to support an installation with such files present (although there’s no overwriting of OS files involved). In short, be careful. For everyone’s convenience, I hope evolt.org will consider hosting .ZIPs of the resulting files, as surely everyone would rather download/serve a subset of the 80MB.