My First Theme

Posted by hornlo on July 29th, 2009 filed in meta

As you may have noticed, I popped in a new theme a couple days ago.

The code is based on Ian Stewart’s “How To Create a WordPress Theme: The Ultimate WordPress Theme Tutorial“, which I highly recommend.

I’ve hacked up the code and had a lot of tedious fun sorting out the CSS ordering dependencies. Don’t be surprised if there is some breakage here and there, since I’m still learning and experimenting. If you notice anything odd or broken, please let me know.

Obviously, I’m not a designer — I just tweaked the CSS to get something up and running. I’ll worry about esthetics and images, if any, later. Once I’m through the initial hacking and playing around, I’ll post a writeup and provide a download link, in case anyone is interested.

Update: 2009-07-30
I’ll actually explain what I’ve done in a later post, but just in case you look at the CSS or view source, some things will look a little squished … because they are. I prefer to work on code with plenty of whitespace and formatting, but spurious w/s can play havoc with layout, so I run my code through this before installing:

#!/usr/bin/perl -w

while(<>) {
    chomp;          # eat end-of-line
    s/^\s+//;       # eat leading whitespace
    s/\s+$//;       # eat trailing whitespace
    s/\s+/ /g;      # convert multi-character whitespace to single space
    next if /^$/;   # skip blank lines
    print $_, "\n";


All handled automatically with make, by the way.

Leave a Comment

Site last updated 2020-08-18 14:20:29; This item last updated 2009-07-30 06:57:03