Over the past year it has become trendy to build theme options pages crammed full of every possible setting. While it is well intentioned, I don’t think it is the best direction to take themes. In software design we always say that adding a preference should be your last resort. First you should try to design an elegant way, and add a setting only if absolutely needed. Thus avoiding unneeded complexity and setup time.
Adding more options actually makes the theme files more complex for someone trying to understand and customize the code that powers the website.
Start by removing options that aren’t really necessary. Here is Justin Tadlock on the subject:
One goal when making themes should be to avoid options by finding more intuitive ways for features to work. Ever heard of widgets?
So what does belong in a theme options page?
- Theme style (Basically choosing a CSS file to reference)
- Logo Upload (?)
- Layout Switching (If it is crucial to the theme)
- Custom text areas (though first consider if a widget would work)
Of course all of these depend on the theme.
So you want to place small bits of code in assorted places throughout the site? Specifically places the user can control? This is perfect for a widget. No need for an entire tab of your options page devoted to configuring ads. Widgets are the answer.
Generally users need to customize page and posts titles, meta information, and modify link attributes. While this can be important to a great site, it isn’t the role of a theme. WordPress has many great plugins that handle all the needed settings and more. Recently in their announcement of SEO settings in their themes WooThemes noted that it is compatible with the All-in-One SEO plugin. Meaning it is nothing more than duplicate functionality, and extra options for an end user to try and understand.
Since custom navigation menus are included in WordPress 3.0, you don’t need to make them part of your theme. If the theme already have this functionality I would recommend removing it with the next update.
Detailed Color Options
You’re a theme designer, right? Then the color decisions you made when designing the theme should be solid. It is good to design several different color variations the user can choose from, and even better to write your CSS so that it is easy to edit and understand. So having users be able to change the color of every link or heading from an options panel is excessive.
Now I don’t think this applies if you are trying to create a blank slate theme (i.e. Canvas, Headway, Thesis, etc).
With support for featured images in 2.9 (then called “Post Thumbnail”), you no longer need image resizing in your theme. Some say the built in WordPress support isn’t good enough, but I haven’t yet found a case where you couldn’t make it work.
Forms are part of the functionality of the site, so they should be handled by plugins. There are some fantastic paid plugins (Gravity Forms) and some good free ones as well. Most commonly themes provide small contact forms to go in sidebars or footers. For that use a widget. Then it can be placed anywhere.
The Grey Areas
Here are the things I am not sure of their place in a theme or not. What do you think?
- Analytics Code
- Support Documentation (Just link to your knowledge base or support page. It isn’t needed as part of the theme)
- Custom CSS
- Number of posts on homepage (WordPress already has a posts per page setting)
Make it your options page design match WordPress. We don’t need a conflicting design style and user experience corrupting WordPress. Genesis is a great example of an options page that truly matches.
When it comes time to code the options for your next theme, keep it simple.
Note: sales from any affiliate links in the article go to WP Tavern. They deserve it.