29 Apr 2004
I've just upgraded to WordPress 1.2 beta---a wonderfully easy and trouble-free process. I think it speaks volumes for the quality of the coding in WordPress that I've been using an alpha version since I switched, without any significant problems. The beta has been tidied up a great deal, and if you currently have 1.0.x installed, you'll find a lot of nice new features. For me, the big improvements are the customisable meta-data you can attach to each post (this is how the EXIF data is stored in Pictorialis, which I use for my photoblog), and the Plugin architecture. You used to have to manually paste the code for hacks into a my-hacks.php file. It wasn't particularly difficult, but perhaps a bit off-putting for beginners. Now the same functionality can be provided by plugins which are just dropped into a directory. They then appear on the Plugins page of the admin interface, where you can enable and disable them with a single click.
I promised---when I wrote about my reasons for switching---that I would list the hacks I had used on my site. Now seems as good a time as any to do that.
The main structure of the site is very similar to the default install. I set up index.php how I wanted it, then put the repeated sections (the header, sidebar, and footer) into separate files to include as follows: include_once('header.php');. I also put an if statement within the loop that iterates over the posts to check whether the variable $p is set. On the individual post pages, this variable holds the post id, so if it isn't empty, we're on an individual page:
if ($p!="") { include_once('crumbs.php'); }The crumbs.php file holds the code for the previous/next post links, which appear at the top of the individual post pages.
Once I had got the index page the way I wanted it, I 'hollowed it out' by removing all the code to handle the post and comment loops, and then used that as a template to build a few of the static pages, like the 'about' page. I used a similar process with the archive page, which uses nice drop-down menus to allow you to view the archive by date, title or category, and filter by year. I'm struggling to remember where I got the file that formed the basis of the archive code, but I think it might have been from WuhWuh. I made a few adaptations to make it work with the human and search engine friendly permalinks.
The remaining customisations are mainly hacks that I have used as provided, or modified slightly to make them work as plugins.
I think that's about it for now, but no doubt I'll be adding a lot more as time goes on.
Update: I forgot another vital part of my switching process, because it isn't a part of WordPress per se, but a nonetheless essential tool. It's mt-wp-redirect by Alex King, which automates the process of permanently redirecting your old blog entries to your new ones. It's very easy to use.