WordPress is great, but the documentation leaves a little to be desired…

Alas, the woes of using open source software rear their heads. WordPress abounds with undocumented, or at least very poorly documented, features.

My dilemma: the default function for displaying a list of page links (used on this site to populate the Points of Interest panel in the sidebar) sorts links alphabetically, and there isn’t any obvious way to make it sort by the database’s menu_order field, which logically, to me at least, should be the default especially given that this is how they’re sorted in the admin tool.

Finding little help in the documentation or by my usual means (Google), I decided it couldn’t be done without modification. In my previous installation of WordPress I actually modified the core code itself to change the sort order, but when I upgraded to version 2.1.1 today, it overwrote that change. This time I decided to try the plug-in approach, so my changes would actually stick through version changes, and so I could get familiar with the powerful but arcane plug-in system WordPress uses for extensibility.

After poking around futilely trying to get my plug-in to work (to the point where it was sorting all of my blog posts the way I wanted the pages to be, but not the page list), I stumbled upon a relevant post in the WordPress forums, where a snide jab at “theme designers” (which seemed to be such a broad swipe that it included me) happened to mention an input parameter in the function that calls the page list!

Silly me… the system has built right in a very simple way to sort the list by whatever field you want, and all you have to do is pass in the right parameters in your theme files. The change couldn’t have been simpler… but learning that it was possible certainly could have!

It’s not finished yet, but it’s already pretty stupid…

You may or may not have seen my Stupid JavaScript Tricks A–Z page. For a while I’ve had a mildly enticing teaser on that page promising “something big” when I get to the letter D. Well, I finally decided to skip C and get started on that “big” letter D. It’s about half done, but since I only get the inspiration (and time) for these kinds of things in short, sporadic bursts, I decided to run with it and post it in a half-completed state. The real topper is what comes next, and hopefully someday I’ll get around to it.

In the meantime, please check out the incomplete… Delete the Internet.