Skip to content

6 Tips to Build Better WordPress Themes

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.

I find the theme checklist on the WordPress Codex very handy for making sure you’ve covered all the bases, and Hafiz from WPLover has a cool interactive WordPress checklist.

2. Include JavaScript libraries the ‘right’ way

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.

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 View All

Ben is a lifelong Nintendo fan who also likes to build websites, and develop games. He also buys way too much Lego.

12 thoughts on “6 Tips to Build Better WordPress Themes Leave a comment

  1. Pingback: 6 Tips to Build Better WordPress Themes | WPLover
  2. Using widgets is awesome. But coding for them is not very easy and fast. When I want to add something to sidebar (which is widgetized), should I create a widget? Or I just put a simple some PHP code in sidebar.php file? I think developers often choose the 2nd way, while beginners – 1st way :D. But if we make a website for clients, of course – 1st way πŸ™‚

  3. I’m speaking at WordCamp Chicago in June on theme standardization and best development practices. Would you at all be interested in working with me on it?

    I’ve collected a list of articles to pull material from, but it seems like you’re actively thinking about this topic. If you’d like to contribute (and of course, be credited as a co-author), please drop me an email. Thank you in advance!

    • Hey Jason – really sorry I didn’t reply to this earlier. Not sure how I missed the post.

      How did the talk go? Do you have some notes I could read?

  4. Excellent tips. I especially agree with #4 and #6 in that you need to make it easy for people to utilize widgets as well as the testing aspect to make sure your theme works from a functional and design standpoint.

  5. Aww… I nice, refreshing post to inspire me as a traught forward in developing my latest WordPress theme for Theme Forest. Good work.

    The jQuery thing is what hit me over the head. Your little tidbit about that got me to Google around and learn more about that, and now I feel like an idiot including jQuery just like any other website. Figures WordPress would have that built in already!

    • The wp_enqueue_scripts thing is really handy, and great for making sure your theme works with all plugins. Glad the post inspired you

  6. Once I was told, provide translation-ready theme so the theme could have a much wider audience and feedback.

    • That’s very true – I should have thought of that one! If I get enough suggestions I might do a follow up post πŸ™‚

  7. The wp_enqueue_scripts thing is really handy, and great for making sure your theme works with all plugins

Leave a Reply

Your email address will not be published. Required fields are marked *