What theme options does your WordPress theme need?

June 17, 2011 · 3 comments

by Tom O'Doherty

What theme options does your WordPress theme need?

I recently released a WordPress theme for bands and musicians called Slates, and one of the most difficult aspects to get right when developing the theme was deciding what theme options I should have. Theme options let users adjust elements of a theme. Often, these are appearance elements such as backgrounds, logos and typefaces, but they can include almost any aspect of a theme.

Although there are plenty of tutorials online about how to get theme options working in WordPress themes, there is not so much discussion about what options, exactly, should be included. I’d like to present the choices I made for my theme here, as a case study for decisions about theme options.


ElegantThemes
ThemeForest

Advertisement

Limits vs. Flexibility

WordPress users are an unpredictable crowd. Some are confident, experienced power-users who want to be able to tweak a lot of aspects of their theme. Others are beginners, or occasional users, who can find it challenging just to get to grips with WordPress itself, let alone having to decide about any options and extras. As a result, theme options have to walk a fine line between setting limits for some users and providing flexibility for others. In making my theme, I had to try to walk this line, and also keep in mind some other problems that can arise when using theme options, which I’ll mention below.

The Basics

I knew that some options were basic things that had to be included. The audience for my theme is musicians, and they want to be able to immediately put their stamp on the theme with a custom logo and a custom background. As a result, these are the first options. Alongside this are some related options: to set a background colour, to set the height of the logo, and to set a different height for the logo when viewed from mobile devices such as the iPhone.

Slates theme options: logo and background options

Another of the basic options that was important to include was to have options for the site header. This is a something that most themes would probably do a little differently. However, I was making a minimalist theme, so I disabled the main navigation and site tagline by default, with an option to turn them back on. Many themes would be better served to do this the other way around, but these are exactly the kind of trade-offs that are required in deciding what theme options to include.

Slates theme options: site header options

After that, the last of the basic options was to include the ability to hide comments, and the ability to set link colours for the theme. The ability to hide comments was important for this theme because some musicians using the theme want to present simple news updates, rather than in-depth discussions, and so blog comments can end up being more of a hindrance than a benefit (this option also removes the ‘comments are closed’ notice which otherwise accompanies blog posts and pages when comments are turned off).

Slates theme options: comments and link colours

Typography

The next thing I wanted to include in the options was the ability for users to adjust typeface and font settings. Typography on the web has been developing in leaps and bounds in the last couple of years, and typographic choices are still one of the simplest and most effective methods of setting the tone and style of any web presence. I decided to stick with the web core fonts for body text, while using Google’s Web Fonts for headers and site titles. This represented a trade-off between supporting newer technologies and supporting users on older browsers (or rather, ensuring typographic consistency for body text in both older and more modern browsers). This was accompanied by options to set font sizes, and to specify different web fonts for both the main site title and for the general site headers.

Slates theme options: typography

Beyond the basics

With the basic options all in place, I had to consider what other options would be helpful and useful for users, without overwhelming them with optional minutiae. I started with some more in-depth options for the site title and site layout. Although I included quite a few options in this section, I felt that they were all justifiable inclusions for the theme. The layout options, in particular, are quite specific to my theme, and most would not necessarily translate easily to other themes, but that doesn’t mean that other themes wouldn’t have equivalent options that could be offered; for example, options about the amount of columns in a site layout, or their widths, or options about where headers appear relative to body text. Again, there could be endless options — the trick is to strike a balance.

Slates theme options: site title and layout

That more in-depth level of options is then followed by a few more colour options…

Slates theme options: colour options

…and then by some options that didn’t easily seem to fit under any of the other headings, but that I felt were important to have available regardless. In particular, the ability to set a border radius for the layout blocks (or, in layman’s terms, to put cute roundy corners on stuff) was one that I wanted users to have available, despite the fact that it is still not supported by all browsers. Other themes might want to shy away from this until browser support becomes more widespread.

Slates theme options: other options

Finally, I added a last option for the page: Google Analytics.

Slates theme options: Google Analytics

This option is one of the most-requested features for themes to have, and musicians just love seeing who has been looking at their site, so I thought it was a no-brainer to make sure it was in there.

If you’d like to see all the options shown here in a single image, in their original context, take a look here.

What I left out

Everything I’ve discussed so far has been about the options I included. However, what is equally as important is what I excluded. There were many options I did not include, and reasons for all of them.

The main thing I left out, which other themes often include, was anything related to advertising. Many well-made themes include this in their theme options, so that bloggers and other online writers can easily add Google AdSense and other similar advertising services to their sites. The intended audience for my theme are unlikely to want to put advertising on their sites, so I didn’t include this.

I also left out any options related to images, videos or audio (apart from the initial site logo and background options). That’s because these aspects of WordPress are best addressed using the built-in tools that WordPress gives users for setting video and image options.

Finally, I also left out any changes to RSS feeds. I felt that as RSS recedes from the mainstream, it didn’t make sense to enable users to change any settings related to it. WordPress comes with RSS out-of-the-box, and I was happy to leave it at that.

There were plenty of other exclusions, but these were the biggies.

Possible problems

A post on Themeshaper by Ian Stewart (a core WordPress developer and ‘theme wrangler’ for Automattic) pointed out nearly three years ago that theme options are not always the right answer. His point — that theme options can be unhelpful when they duplicate functionality which could be better achieved via a plugin — is still relevant, and theme developers should bear this in mind when adding options to themes.

Additionally, theme options can occasionally cause problems when WordPress users add child themes to a basic parent theme. The code in the child theme can sometimes conflict with the theme options which have been set in the parent theme, and this can cause various problems. There’s no easy way to prevent this situation, but knowing that it is a possibility can allow for theme options to at least anticipate that it can arise as an issue.

Conclusion

Theme options can be tricky to get right. They need to allow for a wide range of possible WordPress users, and remain relevant and useful without overwhelming them.  I’ve presented my own decisions about theme options in the case of a single theme, but I’d be eager to hear more about the decisions that other developers and designers have made — please let me know in the comments, or via Twitter. And keep using WordPress to do amazing new things!

Author : Tom O’Doherty

I’m an Irish Web designer, based in Berlin, Germany. Take a look at some things I’ve done or follow me on Twitter.

{ 2 comments… read them below or add one }

Web Development June 17, 2011 at 12:01 pm

First time trying my hands on developing a wordpress theme. Your post is very helpful, thanks for sharing.

Reply

Ridhuan June 17, 2011 at 11:40 am

Thank you very much. I’m creating some themes and this is a good help.

Reply

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

{ 1 trackback }

Previous post:

Next post:


Web Analytics