Create a WordPress Theme

There are literally hundreds of WordPress themes available for free, many of them excellent designs. However, a serious commercial website needs to be unique and a simple change of header image doesn’t really qualify.

People like myself, who run tutorial sites and tell you that modifying a WordPress theme is easy, well let’s just say we are only being partly honest. The principles are straightforward enough and it isn’t too hard to make some sense of all the code. But when you look under the hood of WordPress and spend a little time digging around, it soon becomes obvious that it is every bit as complex as it first appeared. Just not in the ways you initially thought.

Part of that complexity comes when you gain some understanding of how it all works and the almost infinite range of possibilities becomes more clear to you. Sure you can create a one-column or a two-column design, but there is nothing to prevent you having 3 or 4 columns, no reason why the sidebar needs to be on the side. And just because the links follow the search box in the default design, doesn’t mean it has to in yours.

One of the best ways of coming to grips with WordPress is not by making minor tweaks to existing themes, but by building your own design from scratch. Not entirely from scratch, because the most efficient way I have found to build themes is to start with a stripped-down theme. Check that link out and what you will see is a basic WordPress layout, complete, but with absolutely no styling. It has a stylesheet and that stylesheet has in it identifiers for all the ID and class tags used in the HTML. But they have no parameters. Yet.

Over the next few articles, we are going to turn that skeleton into a full-blown, working theme. “We” because I have zipped up the blank theme so that you can download it, unzip it and then load it into the themes directory on your own test site. Test site? Even if you are an old hand with WordPress, it makes sense to have a second installation in a sub-directory so that you can test themes and plugins ahead of making them live on your main site. And this exercise will be spread over several articles with a day or two between each, so it really isn’t going to be practical to work with a site which already has visitors.

Here is the zip file and you have a couple of days to set it up and think about whether you simply want to go along with the theme I shall create, or do one of your own. I’m going to go step by step through the whole process from beginning to end, so with a minimal knowledge of HTML and CSS, you should have no trouble following. And if any problems do arise, just post them on the board here and we shall work them out.

I’m going to create a fairly typical “babelog”, one which combines text and pictures: we may even add some RSS feeds from a couple of sponsors. I’m not into the “Hello World” type of exercises you get in text books: when this is done it will be a fully working site. So if you want to go along for the ride, download the zip file now and check back in a day or two for the first article.

Leave a Reply