If you want to make WordPress themes, for clients, to release for free or to sell, then there are a lot of factors you need to take into consideration. Below are some hints and tips that should help ease your development process.
1. Think Like a User
If you are building a theme for yourself, or for a client, this isn’t quite so relevant, but if you’re building a theme to sell (such as my themes on Pro Theme Design), or a theme to give away (such as my theme Regulus) then you need to consider how people will be using your theme.
This is probably not the most important thing in this list but it is the thing that prompted me to write this article.
I had seen a tutorial explaining how to create a WordPress theme and it included jQuery, in the site head as an include. That can work fine for your own website but things quickly get sticky when you use WordPress plugins. Many plugins rely on jQuery so also include the library – thankfully most do it the ‘right’ way. With wp_enqueue_script().
3. Use built in WordPress functions wherever possible
Websites like WPEngineer, Cats Who Code and Digging into WordPress all feature handy (and very clever) hints and tips for manipulating WordPress content – and that stuff can be really helpful – but wherever possible it’s always better to use functionality built into WordPress.
The reasons for this are many, but the primary advantage is that any changes, bug fixes, and speed enhancements made to the WordPress core will automatically be carried over to your theme… and you don’t have to do any extra work!
4. Widgetize everything
This might sound a bit silly, but the more areas you convert into widgets, the better.
Gone are the days that your users will edit the PHP themselves to add some extra descriptive information… and anyway, it’s probably not where they want it.
Widgets put the power in the users hands, and gives them the opportunity to create the site they want. Additionally it removes (some of) the burden of support from you.
Check out the websites below for information on setting up widget bars in your themes.
- How to Add WordPress Widgets to your Theme
- Automattics Widgets documentation
- How To: Add Widget Support to Your WordPress Theme
- WordPress Widgets API on the WP Codex
5. Include all the standard WordPress functionality
This ties into point 1 but if WordPress advertises a feature on their website (threaded comments, widgets, etc) then people will expect them to work in any theme they chose to use.
This means you should either include them, or prepare for lots of requests from people asking you to include them.
6. Test, Test, Test
Things can and will go wrong. Something I would be really interested to see is some sort of unit testing system for WordPress. I’ve found a few testing systems but currently there’s no easy way to automate it. However WordPress is a very flexible beast – which is great from a users point of view, but also means that users will often come up with combinations of settings that you hadn’t considered and so they break your theme.
Just Do It
Building good quality, free, themes is a great way to build brand awareness and gain recognition in the WordPress, and even the web design, community. However it’s a double-edged sword. For some reason people who use free themes are more demanding than those who pay you to develop a theme.
Following the rules outlined above will help you improve the theme functionality and reduce the support requirements – it’s a win for everyone.
Ben is a lifelong Nintendo fan who also likes to build websites, and develop games. He also buys way too much Lego.