Man, theme options.
There aren’t many more topics in WordPress theme development that inspire more discussion these days than theme options. If you haven’t seen it yet, check out Konstantin Kovshenin’s Theme Options Gallery. Konstantin reviews the best and worst theme options pages around there. It’s where the best discussion on theme options is happening right now.
Author Archives: Ian Stewart
Let’s Talk about Semantics
If you’re interested in HTML Semantics and are looking for a good place to start learning more about it and what it means start out with this post at HTML5 Doctor, Let’s Talk about Semantics. At the very least, you’ll learn why we don’t have a pineapple element in HTML.
Tighter and leaner WordPress templates with get_template_part()
If you’re interested in learning more about how to use get_template_part() in your themes and why you might want to, designer and developer, Terry Sutton, has a great post up called Tighter and leaner WordPress templates with get_template_part(). It’s well worth a read. (And not just because he mentions _s though that’s pretty cool too.)
Getting Started With the _s Theme
There are some simple instructions in the theme readme.txt on how to get started with our new starter theme, _s, but, to be honest, I’m not exactly the most reliable readme reader myself so here are those instructions with a bit more explanation.
The first thing you want to do is copy the _s directory and change the name to something else. Like, say, megatherium.
Then you’ll need to do a three-step find and replace with your favorite text editor on the _s name in all the templates.
A 1000-Hour Head Start: Introducing The _s Theme
Have you checked out the Toolbox theme? Up until recently it was the starter theme we used to build free and premium themes on WordPress.com. Toolbox was (and is!) a great theme, but it could be better. Unfortunately, we wound up in a situation with Toolbox where we wanted to make some more drastic improvements to it as a starter theme but got a little stuck. We had people using it as a Parent Theme and that meant that the simplest id or class change could become a problem. Simply changing an id of #branding to #masthead in the template is enough to break most CSS.
And there were other more beneficial but potentially more disruptive changes we thought would be great to add to it. Changes like better starter styles, including a generic framework for adding your own responsive CSS; a script for elegantly handling menus on small screens; and easy-to-rework sample theme options. And whole lot more. The sort of things we found ourselves adding to 80% of the themes we were building. You know, the sort of things that you really need in a starter theme.
So, we forked Toolbox — don’t worry it’s still being updated — and made a better, faster, stronger, starter theme. A developer-only theme that gives us the freedom — us being the WordPress.com Theme Team — to iterate with abandon on the idea of WordPress starter themes. Since that theme underscores the new themes we build we call it the Underscores Theme, or _s for short.
And it’s pretty darn awesome.
WordPress Themes in 2012
The other day I was asked over dinner what I thought WordPress themes were going to look like in 2012. The big themes and ideas — the future! — that sort of thing. It’s something I love talking about and sharing (obviously). I see two big trends making their way through the WordPress community. Here’s what I said.
Using Media Queries to Make a Clean Break from Legacy Browsers
There’s a nice, clean, javascript-free, approach to mobile-first design in Joni Korpi’s post Leaving Old Internet Explorer Behind. Adopting it sounds pretty tempting.
Twitter Bootstrap and WordPress Theme Frameworks
If you haven’t yet you should make some time to read Building Twitter Bootstrap at A List Apart. Especially if you’re interested in building a WordPress Theme Framework or WordPress Starter Theme.
Twitter Bootstrap is essentially a collection of HTML-CSS templates and some Javascript put together to “help designers and developers quickly and efficiently build awesome stuff online.” It sounds an awful lot like a lot of WordPress Theme Frameworks and Starter Themes, right? It looks like one too.
What Do You Really Need in a WordPress Starter Theme?
I think it’s safe to say that I’m somewhat obsessed with themes that help you get your WordPress projects started quickly. Most likely because I’ve been there, staring at an empty project folder wondering where I should begin. Well, you shouldn’t have to stare at that empty folder for any project. Even when you’re starting from scratch you’re probably not really starting from scratch, right? You’re taking an existing WordPress theme, either your own or someone elses, and hacking at it until it’s something new. That theme is your Starter Theme.
But not all Starter Themes are created equal. If you’re using the same theme again and again and always adding the same code to it, well, shouldn’t that code always be in there in the first place? Or how about the reverse? If you’re always cleaning out the same code from your theme is that really a great starter theme? Should it have sample theme options? Or a CSS reset? Basic styles? How much style? A grid system? … The questions could go on for a while.
So, what are you using for your Starter Theme? And what do you think you really need in a WordPress Starter Theme?
The WordPress Theme Lock-In Effect
Konstantin Kovshenin has a great post on one of my pet peeves. The lock-in effect. The rub? When you go to switch themes you find that your content is tied into the theme (or plugin) you’ve been using. Not good.
WordPress has been known for its backwards compatibility for ages. In fact, you’ll not loose your content when you downgrade (provided that you’re using the core features only,) plus WordPress provides several export options that can easily be read by other software and services. WordPress gives you control over your data so you’re never locked in to using WordPress itself. WordPress does not lock you in.
Plugins and themes are somewhat different though, mainly because developers are overlooking the WordPress API and a bunch of features which already ship with WordPress, and tend to reinvent the wheel. Another situation is where plugins or themes introduce some brand new features unavailable in WordPress so they store your data in a unique way which is not what other themes and plugins can understand. If not treated well, the lock in effect can cause loss or corruption of your data …