How hard is it to create a WordPress theme?
Armed with a ready supply of tea, a well stocked iTunes library and a kick-ass design from Ryan DC, my mission, if I chose to accept it, was to find out …
I’ve already written a plugin about how to mobilize your WordPress blog, (you can find the homepage here), but this is all about making it look pretty on web. No serious coding here, it’s all about the design, complete with crayons and colouring-in books – a bit more Tony Hart than Tim Berners-Lee.
So what’s the first step?
Copy and paste. No, seriously – copy the default theme and paste it into a new folder. Then make a few changes to the stylesheet comments at the top and you’re ready to begin. Activate it in the “Appearance” tab and you can start to work on it.
If you stick to the conventions in your new theme and don’t change the names you won’t go far wrong. Infact, if you do change the names of the files, I’m not even sure if things will work. Anyway, the main files you’ll be wanting to change are style.css, header.php (your header) and maybe a few of index.php (main home page), single.php (post pages) and archives.php (archives and search results).
Change some CSS, create new images and delete old ones. Amend class names if you want, add ID’s, take them away. It’s up to you. I tried to stick to what was already there but you can do whatever you like. Use Firefox to look at your theme and install Firebug, you’ll be glad you did.
And that’s pretty much it. The CSS in my new template is not a million miles away from the default but references all the imagery and colours that were in the new design.
You don’t have to be a rocket scientist to create a new theme. You don’t even have to be Johnny Ball – you just need a couple of hours and a little bit of CSS wizardry at your disposal. I’m now thinking that I could put a few more dynamic elements into the theme – maybe have a sun appear in the mornings and a moon at night. That would be cooler than robots.
If you want to see what my first attempt looks like, head over to http://richholdsworth.com and let me know what you think. And if you’ve got any interesting ideas for templates and making them a bit more fun, get in touch and I’ll see what I can do.Tags: johnny ball, themes, tony hart, WordPress