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.

Let me know what you think on Mastodon, or BlueSky (or Twitter X if you must).

WordPress News

The latest WordPress updates from the WPBriefs Podcast.

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...
29 Mar 2009

The future of WordPress themes

A couple of weeks ago there was quite a lot of talk within the WordPress themes community about the future of WordPress. Ian Stewart started it, and then it spread around the blogosphere… so I thought I’d offer my rather...
08 Aug 2013

The Death of WordPress Theme Frameworks

WordPress theme frameworks are on their way out. They’re dying a slow death. At least that’s what I think.Nathan Rice recently wrote an article with his thoughts about theme frameworks – in defense of them – however he clearly has...
15 Jan 2010

Building WPVote Part 5 : Programming

I’m nearly finished with the design of my new WordPress voting site, WPVote, so now need to look more closely at the programming.I enjoy dissecting WordPress themes, and since I also like code simplicity and minimalism (and am working with...