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.

How was it for you? Let me know on BlueSky or Mastodon

(Please) Link to this page

Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.

Related Posts

01 Apr 2015

The State of WordPress Themes #wcldn

I recently spoke on a panel at WordCamp London 2015e. Lance – who used to be the Theme Team lead at WordPress.com – asked me if I wanted to speak on a panel with him at WordCamp London 2015. I’ve...
13 Oct 2016

Lessons Learned from 20 Theme Releases on WordPress.com

In 2007 I partnered with Darren Hoyt to release Mimbo Pro, one of the earliest premium WordPress themes. In 2012 Mimbo Pro was published on wordpress.com. Last week – on October 5th 2016 to be precise – my 20th theme...
27 May 2013

WordPress: 10 Years Young, What Does The Future Hold?

WordPress is now 10 years old. I started using wordpress 9 years ago – which means I joined the WordPress community early on. The reason I chose WordPress is simply because of the fabled 5 minute install process – I...
14 May 2013

Redesigning the WordPress Post Editor

Ghost is a project born from frustration with WordPress. Ironically it seems to be mostly WordPress power users who want to use it. The Ghost team – led by John O’Nolan – put Ghost on KickStarter last week and it...
02 Feb 2012

WordPress Theme Framework: Less Is More – Or Is It?

I have a conundrum. I want to improve Elemental – my WordPress theme framework. I want to make it lean and fast; but this will involve removing functionality. This in turn means that when people upgrade their themes things may...
22 Jul 2010

Hints and Tips to Make Your WordPress Development Easier

Recently I was contacted on Twitter by Josh Fialkoff how I develop WordPress themes, and I thought the answer would make for perfect blog fodder.I used to work entirely on my local computer, with apache, mysql, and php installed (XAMPP...