Hey WordPress Team: How About Theme Options, Officially Supported?

Having worked on a WordPress theme called Fauna for a while now, I’ve learned that theme options can be quite helpful.

In a nutshell; if you have installed WordPress, you can download a WordPress Theme, unpack it and with a single click, activate it. This will change the look and feel of your website. Additionally, themes can have theme options, meaning if the theme comes with a header image, chances are you can easily switch that header image out on the theme options page.

Fauna does that, with the help of a so-called Themetoolkit. The themetoolkit is a 3rd party collection of functions that makes adding an options page rather easy. Very little PHP knowledge is required, and the results are pretty good. Even so, in adding this feature to Fauna, I’ve had to deal with both security issues, compatability issues and plugin conflicts.

Now why isn’t there a 1st party “theme toolkit”? Like the extensive WordPress plugin APIs, why isn’t there a similar complement to theme options pages? If a 3rd party can make theme options easy, surely the fine WordPress team can make theme options easier and more secure!

There are a number of benefits to this. First and foremost, if a security issue or a conflict is discovered, the issue can be fixed in the next WordPress release and automatically all themes using the theme options APIs would benefit from the fix. Secondly, it is in the interest of the WordPress team (especially in this WordPress.com era) to have happy theme authors working on great designs that are easy to port to WPMU. Moving the heavy code-load away from theme authors not only encourages good designs, but gives the WordPress team an extra measure of control over potential security risks.

It is the logical evolution of WordPress themes. Everybody wins.

Responses to “Hey WordPress Team: How About Theme Options, Officially Supported?”

  1. Chris says:

    I give up on WP.

  2. Joen says:

    Oh ye of little faith.

    I understand your gripes, but the way I see it — right now, WordPress is still the best alternative for blogging.

  3. Gareth says:

    While i agree wordpress is great for getting a quick blog going, if you are handy with a bit of php and want total control, why not use a simple cms like modx ?

  4. One for Habari ;)

  5. [...] Official Theme Options Noscope | Hey WordPress Team: How About Theme Options, Officially Supported? [...]

  6. Robin says:

    Joen: I don’t know what you’re really going on about… you can add a themes options page using add_menu_page or whatever, and then just do your own options page, much like plugins do. Just a bunch of add_option’s and get_options’s.

    James: Habari has issues that I can’t even begin to list. Their biggest issue is they have huge shoes to fill, with the big buzz on the launch.

    Oh, and the Live Preview escapes ‘s (apostrophes) with \ (backslashes).

  7. Joen: I don?t know what you?re really going on about… you can add a themes options page using add_menu_page or whatever, and then just do your own options page, much like plugins do. Just a bunch of add_option?s and get_options?s.

    That’s the point: It should be easier to build a theme option page, heck, it should be easier to build a theme in such a way that it can be packaged properly so that it’s completely self-contained by default.

  8. Joen says:

    Joen: I don?t know what you?re really going on about… you can add a themes options page using add_menu_page or whatever, and then just do your own options page, much like plugins do. Just a bunch of add_option?s and get_options?s.

    It may be that I haven’t explored the add_options and get_options quite enough, but to me it still seems like an underdeveloped aspect of WordPress themes. Meaning: It’s not quite as easy to do with WordPress as it is to do with the Themetoolkit. To me, this is … well, the wrong way around.

    While I do understand that writing a plugin takes quite a bit of skill, to me, the theme options page is still something that should be codable by a theme author. Making this easier means more themes and better themes, not to mention more security.

    Oh, and the Live Preview escapes ?s (apostrophes) with \ (backslashes).

    I’m on it :)

  9. Tristan says:

    zenblog anyone? ;-)

  10. Joen says:

    zenblog anyone? ;-)

    Elaborate! :)

  11. Tristan says:

    It’s just something I’ve been mulling about in my head… it kind of “comes for free” with the object model I’m planning for zenphoto2 (a little ahead of myself, I know ;-). Eg: as long as you have objects and groups of them with comments on them, just make groups of Articles instead of groups of Images and you have a Blog instead of a Gallery. Pretty simple when you think about it.

    Plus it gets free integration with Zenphoto, a media library to pick and choose from or upload to dynamically while writing posts, themes that look the same for both blog and gallery, super simple ‘photoblog’ capabilities, linking images back to posts they’re in and vice versa, all the tagging features for Images (planned for zp2) working on articles too… it just makes sense (to me anyway).

    What do you think?

  12. Tristan says:

    Oh yeah, forgot to leave this link…

    http://www.zenphoto.org/trac/wiki/ZenphotoDevModel

    Also, this is all on-topic of course because Zenphoto includes no less than Six (6) themes in the base package with more on the way.

  13. Jeff says:

    See, the problem with building something like this is that

    1) You have to get theme developers to use it

    and

    2) You have to get theme developers to use it

    See, with reason one, I’m talking about people just starting with themes. With plugins, it’s a no-brainer. Plugin devs are NERDS. (I’ve made several.) We are tech to the core, we get API’s and JSON, and Callbacks, and all that good stuff. We jump on API’s like butter on bread … or something.

    A theme developer? No sir — not a nerd by default. Theme developers like the pretty things, that’s why they make themes. So you have to get these people in the habit of coding for real life situations like this kind of extensibility. If you haven’t ever followed theme dev threads, the WP world still has trouble getting people to include wp_footer() and wp_header() calls in every theme!

    A plugin author makes the plugin to do a task; often times in multiple ways with many different ways to lay things out thus making APIs and such a godsend for them. A theme developer is (waaay more often than not) making a theme to look and operate a very certain way. (There are GREAT examples of themes that do not work like this and allow awesome customization, but I can count them on one hand among the thousands that don’t.)

    Additionally, you have to get all those old themes to fit into this neat little box too — and while plugins sure can, themes never really do. Widgets, in WP, are about as close to “standard shared resources” as the themeing platform has gotten, and that’s with a lot of work too.

    But, really, what it comes down to is that theme options are inherently extremely theme-centric. While it comes across as simple that things like “link color” , “background color” and other such basic elements could be “globally” defined and applied to themes through a default theme toolkit page, that is not only theme un-friendly, but where the customization ends. Themes get so specific! Header image? How wide? Transparency? Cropping? Rounded corners? Faded effects? Button borders? With all these very specific design elements, it becomes extremely burdensome and cumbersome to design a global interface for tweaking options that can be such minutia.

    Think about this too: If you made a theme which allowed “Theme Options” to override your well balanced colors and discovered it being used to recreate something reminiscent of a myspace profile — would you not tear your hair out?

    Plugins work with API elements because plugins are very specific in what they do, often time doing something unseen. They (usually) run, process, and produce output for a simple, single task and then disappear.

    A theme is far, far more complex and I think a set of blanket options would end up being offensively used on carefully crafted designs and not nearly comprehensive enough to provide functionality outside of said butchery all the while, hardly getting used..

  14. Jeff says:

    Lol, I should have made it a blog post :D

  15. Joen says:

    Pretty simple when you think about it.

    Soo go for it. Just make sure it feels like a “logical extension of the image gallery”… I mean, I think it’s a really good idea, especially for photo bloggers, but remember that ZenPhoto was created as a breath of fresh air in a world where photo galleries were so feature creeped that there was an obvious spot for you.

    But, really, what it comes down to is that theme options are inherently extremely theme-centric. While it comes across as simple that things like ?link color? , ?background color? and other such basic elements could be ?globally? defined and applied to themes through a default theme toolkit page, that is not only theme un-friendly, but where the customization ends. Themes get so specific! Header image? How wide? Transparency? Cropping? Rounded corners? Faded effects? Button borders? With all these very specific design elements, it becomes extremely burdensome and cumbersome to design a global interface for tweaking options that can be such minutia.

    See that’s a really good point.

    I remember thinking the same thing when I started out with WordPress: “get_sidebar” ? What if I don’t want a sidebar!

    Even so, I think themes can have things in common with regards to options pages. Punch holes through various areas, and replace them with variables configurable on the options page. That could be those theme centric options you mention, it could be a simple “about” box.

    Essentially what I’m looking for is two things, and if these two things are already IN WordPress, please do let me know;

    1. Ability to store a global variable that is accessible via all theme includes. It could be something like < ? echo get_theme_option('about_me'); ?>
    2. A “toolkit” for the options page with stuff like “dropdown box group”, “radio button group”, “textfield” and so on.

    I’m getting what you’re saying about having it be wortwhile to do this, but I still think it can be done, and I still think it can make sense.

    Lol, I should have made it a blog post :D

    You still can! Trackbacks are open ;)

  16. Chris says:

    Lol, I should have made it a blog post :D

    No worries. We encourage ass long comments around these parts. Otherwise, I wouldn’t be able to post at all.

  17. Joen says:

    No worries. We encourage ass long comments around these parts. Otherwise, I wouldn?t be able to post at all.

    Indeed.

    With the number of comments I get, we even encourage off topic conversations.

    Off topic is only a problem when there are 5000 (plus minus) comments, in my experience.

  18. Chris says:

    Off topic is only a problem when there are 5000 (plus minus) comments, in my experience.

    Agreed. I mean, at that point, it’s just ridiculous.

    So… anyway, 300 came out yesterday. Think I’ll be going to see it tomorrow.

  19. Tristan says:

    Soo go for it. Just make sure it feels like a ?logical extension of the image gallery?… I mean, I think it?s a really good idea, especially for photo bloggers, but remember that ZenPhoto was created as a breath of fresh air in a world where photo galleries were so feature creeped that there was an obvious spot for you.

    I still haven’t decided of course — it’s hard to say if I would be eliciting more feature bloat or actually doing something useful. For now at least I believe really dialed wordpress integration would be the best way to go, considering the backing they have. No need to reinvent the wheel I suppose… even though I still can see room for a next-gen blogging platform somewhere along the line. And wordpress’ chances of doing that… hmm… can I make a reference to Shuttle in that regard? We’ll see what turns out once ZP2 is somewhere.

  20. Joen says:

    Agreed. I mean, at that point, it?s just ridiculous.

    Ha ha, yeah…

    So… anyway, 300 came out yesterday. Think I?ll be going to see it tomorrow.

    OOh, I have to wait until April something.. (Premiere is 31st of May in Denmark, but I’m doing something that day).

    No need to reinvent the wheel I suppose…

    Of course not, but the way I read your previous comment (and I can be wrong), the blogging aspect would be a “side effect” of ZP being coded properly, and hence being flexible enough to emulate a blog… If that’s the way you’re going, the fine, right?

  21. drmike says:

    Been one for WPMu for ages.

  22. Joen says:

    Been one for WPMu for ages.

    Yeah, but it’s not very good, IMHO.

  23. assevemupslex says: