Ben is a lifelong Nintendo fan who likes to build websites, and make video games. He buys way too much Lego.
I was asked recently how to get into WordPress themeing and so I thought I would answer publicly. Perhaps my thoughts can help others.
When I first started using WordPress things were much simpler. The default theme was an index.php and a stylesheet. There were no page templates (in fact there were no pages at all) so it was literally just blog posts and archives. In addition WordPress didn’t have custom menus, or headers, or widgets, or the theme customizer – things that themers now use to make themes fully customizable.
Most themes came with a readme.txt explaining how to change different elements of the theme – eg edit line 512 to change of index.php to change the copyright information. Looking back it seems crazy – and whilst the index.php file could be messy – it did mean there was a lot less to learn.
So what would I suggest if someone asked me how to learn to build a theme now?
I am going to assume that the person asking me the question already has knowledge of html, css and some basic PHP – but if not you’ll need to learn that first. You’ll also need a dev environment of some sort – MAMP and XAMPP are good ways to get started.
- Use the theme tutorials on Themeshaper – they walk you through the process of building an entire theme.
- Use _s as a starting point – _s is a great theme to start with and there’s a lot that can be learnt from it.
- Deconstruct the default themes – They come with WordPress, and they’ve been field tested by thousands of people. They’re pretty awesome – but they’re also not so technical that you won’t understand what is happening.
- Download and edit themes from WordPress.com – if you want more (after taking apart the default themes) then I think the themes on WordPress.com are great, and are all code reviewed by the team on wordpress.com. They also cover all the main features of the software and are in use by thousands of people so you know they are solid. A few of the themes I would recommend are Ryu, Expound, and Motif.
- Follow online courses – more? Ok then, I would recommend looking at the courses by WPShout, they’re good friends of mine and make really comprehensive courses. Well worth taking a look. They currently have two courses, Up and Running with WordPress, and complete guide to WordPress Security.
You’ll notice a lot of my suggestions involve the wordpress.com theme team and using the things they have created. I’ve worked with the team a lot and they know their stuff!