What are the best resources for WordPress theme-development? I am currently in the phase of starting my own blog, and don’t want to use one of the many free themes. I already have a theme for my website, so I want to read about best-practices.
Any advice on how to get started would be very welcome 🙂
I have now created my theme (wohoo!), and thought I should summarize the best resources I found. Lets see..
Resources:
- ThemeTation’s three-part guide to create a wordpress-theme from scratch
- Nettuts.com’s guide: How to Create a WordPress Theme from Scratch
Didn’t actually use this, it’s a quite new article, but anyway – it’s great. It will get a follow-up in the next few days too.. - WordPress.org’s own guide on templates
Definatly a must-read for everyone new to wordpress-designing.. - “The loop”
Essential knowledge, also a must-read - Directory of all the template tags
Used by wordpress to actually output blog-content..
Inspiration:
- Smashing Magazine’s lists: first, one more, yet another one
- WordPress.org’s theme-directory
I think that the best way to learn is to look at how other people construct their themes. The first one to start one is the Default Kubrick theme that is included in the standard WordPress install. It has all of the basics and will show you some advanced techniques like including sidebar widgets. Next, in conjunction with the docs on theme development (previously mentioned by Mark), Blog Design and Layout and Using Themes, go to the Theme Directory on the WordPress.org site, download a couple of popular themes, and go through them, looking up any template tags or techniques that you don’t understand. After you do this, you should be more than well-equipped to write your own theme from scratch, or modify an existing theme to your needs.
The WordPress part is the easy bit. That’s basically taking your static HTML pages then converting them to PHP and inserting the WordPress tags to pull content from the database. In some places these tags will be in a loop, e.g. for a list of pages.
The most difficult part is the design. You should identify the page types you want (e.g. main page, lists of posts, static pages, about) and create the actual templates with mockup text. ONly when you’re happy should you think about the WordPress part.
If you search with Google you’ll find plenty of pages on creating your own WordPress theme or converting HTML to a theme.
Here’s another good article on the topic. And of course, there are many more like it. I have reviewed this particular article in the past though, and found it to be a good, detailed tutorial with some nice external references where required.
codex.wordpress.org.
Here’s the WordPress doc on Theme Development
I’ve found this illustration shared by Yoast to be really helpful for explaining how a WordPress theme is built:
Full image here
This is a crop of the full image – I’d suggest checking it the full page there, as it’s extremely clear, and very well thought out.
Found a new one over here. it’s a good resource if you want to make a simple theme. 🙂
http://www.webhostingsearch.com/articles/create-your-own-wordpress-theme-tutorial.php
check css-tricks.com Chris has a few screencasts up.
There is a really good book on WordPress Theme Design, called “WordPress Theme Design” 🙂
Available from Amazon and other book stores.
‘Starkers’ is a great blank WordPress theme to start any theme development.
http://elliotjaystocks.com/blog/2008/free-starkers-wordpress-theme/
This WordPress Meta Box PHP Helper class might help you when working with WordPress Meta Boxes.