On Breaking and Fixing WordPress Themes at WordCamp Singapore 2011

My coworkers at Automattic and I frequently discuss the speed with which we’re able to onboard new themes into the WordPress.com theme directory.

Our top priority as the Theme Team is to make sure that all of our users feel like they have a theme that fits them perfectly; in order to meet that goal we’re focused on bringing a variety of themes into WordPress.com through a few primary channels: the WordPress.org theme directorypremium theme shops; and Automattic (in-house) themes.

It’s often the case that each conversion—that is, making a theme’s code WordPress.com-safe and ready—will take us anywhere between one week and one month, depending on the complexity and quality of the code. In a perfect world, though, we’d be able to snap our fingers and have every single awesome-looking theme available on WP.com right now.

Continue reading “On Breaking and Fixing WordPress Themes at WordCamp Singapore 2011”

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.

Continue reading “A 1000-Hour Head Start: Introducing The _s Theme”

New Default WordPress Theme Twenty Twelve Hits Core for 3.4

Speaking of WordPress Themes in 2012, the new WordPress default theme for this year is in da hizzous.

For the 3.4 release cycle the core WordPress team is trying something new: assigning small teams to tackle various parts of the release. The Twenty Twelve team is Matt Mullenweg (Holder of the Keys and Grand Master Themengineer), Drew Strojny (Designer and Minimalist), and Lance Willett (Thematurge).

Want to keep tabs on this new default WordPress theme? Follow development updates on WordPress Development Updates and in Trac: Twenty Twelve ticket and Bundled Themes.

We’re super excited to see it land in WordPress trunk and start taking shape.

What’s In a Name: Duster

A lot of people have been asking where the name for the Duster theme came from. I love naming themes (it’s probably something that warrants a post of it’s own in the future) so I’m glad to share the backstory. We started work on Duster during a team meetup in Arizona — notorious land of cowboys and shoot ’em ups. We wanted something that reflected that same tough cowboy aesthetic and so, Duster. Well, actually, that’s only half true. It’s also the name of this really lovely pink flower you can find in Arizona. It’s really quite beautiful. 🙂

Premium Themes on WP.com, the backstory

It’s kind of appropriate this is my first post here on Themeshaper, given I first kicked off discussion of a WordPress.com theme marketplace four years ago. (It’s funny to see some of the comments there, some of the same cast of characters.) The terms we’re launching with are the same as in that post, an even split, but the opportunity is much larger. When I wrote that post I talked about the 1,736,206 potential customers for a theme, we’re now approaching 17 million blogs almost 10x that size. In fact we now add a new 2007-sized-WP.com every two months.

Continue reading “Premium Themes on WP.com, the backstory”

Toolbox: An HTML5 WordPress Starter Theme

The Problem: You want to start hacking away at a WordPress Theme and get your site online. You don’t want to start with a Parent Theme, or a Theme Framework. You want to make your own theme—and you want it to be ready for HTML5. Only, you don’t know where to start.

The Solution: Start your WordPress theming engines! The delightfully blank, and stripped down, Toolbox theme is here.

Continue reading “Toolbox: An HTML5 WordPress Starter Theme”

A Sample WordPress Theme Options Page

Update: This post is crazy old and there are way better options for … options panels now. Like the customizer! Otto can tell you how to leverage the customizer for your theme options. Or, heck, just go ahead and check out the sample code we use all the time.


Problem: You want to create a simple theme options page for your new WordPress theme but all the tutorials and sample theme options pages you’ve seen are way too complex or don’t fit in at all with the existing WordPress look.

Solution: We’ve come up with a simple, sample theme options page you can use for your next theme!

We’ve based this theme options page on the awesome sample plugin options page created by Ozh of Planet Ozh—only now with the bonus Radio and Select options and a Text Area.

Everything is bundled up in a Twenty Ten child theme called A Theme Options Theme—an instant working example—that you can download at the end of this post but here’s how you’d want to use it in your own themes …

Continue reading “A Sample WordPress Theme Options Page”

Using TextMate for WordPress Code Cleanup

I spend a lot of time cleaning up WordPress themes. During the code cleanup I often perform certain cleanup tasks over and over, which makes them perfect for TextMate commands.

In this post I’ll show you how to add two useful commands to TextMate, then move through the steps I take for theme code cleanup and put the commands into practice.

First, let’s add the commands to a TextMate bundle. If you don’t know how to add commands to a TextMate bundle, or don’t have your own bundle set up yet, start here and add a new bundle. I usually add my own commands to a bundle called @lance so it sticks to the top of my bundle list.

Continue reading “Using TextMate for WordPress Code Cleanup”

Quick and Dirty Widget Testing

Testing widgets with your WordPress theme would be so much faster if you could enable all widgets at once, instead of dragging them one by one.

Here are two small functions to help with widget testing. The first takes all “Inactive Widgets” and adds them to the first registered sidebar in the theme. The second removes all widgets, leaving the widget area empty.

To use, add the code into your theme’s functions.php and uncomment the add_action() calls to trigger the functions. Happy testing!

<?php

/**
 * Quick and dirty inactive widget loading
 * Loads all inactive widgets into first registered sidebar
 *  
 * @global array $wp_registered_sidebars
 */

// To use: uncomment the add_filter call below, then refresh your admin Widgets page
// add_action( 'in_widget_form', 'enable_inactive_widgets' );

function enable_inactive_widgets() {

	// get first registered sidebar
	global $wp_registered_sidebars;
	$first_sidebar_id = array_shift( array_keys( $wp_registered_sidebars ) );

	// get widgets
	$widgets = get_option( 'sidebars_widgets' );

	// if inactive widgets exist, add them to the first sidebar
	if ( isset( $widgets['wp_inactive_widgets'] ) && '' != $widgets['wp_inactive_widgets'] ) {
		$inactive_widgets = array(
			$first_sidebar_id => $widgets['wp_inactive_widgets']
		);
		update_option( 'sidebars_widgets', $inactive_widgets );
	}
}

/**
 * Quick and dirty widget removal
 * This will remove both active and inactive widgets
 *  
 */

// To use: uncomment the add_action call below, then refresh your admin Widgets page
// add_action( 'in_widget_form', 'remove_all_widgets' );

function remove_all_widgets() {
	update_option( 'sidebars_widgets', null );
}

?>

An Idea for a New Default Theme for WordPress—Introducing Kirby

In 2010 WordPress will get a new Default Theme, replacing the beloved/hated Kubrick Theme with a new Theme called 2010. I’ve got opinions on the matter. Oh, do I have opinions. I’ve even gone so far as to create a working idea for a new Default WordPress Theme. Read on to find out more.

Principles for a WordPress Default Theme

I’ve set myself some principles for designing a Default Theme.

  1. It should look like a really nice blog theme with a “WordPress” feel
  2. It should be easy to modify and tweak by directly editing template files
  3. It should be easy to Child Theme without directly editing template files

These 3 principles sound pretty simple, right? Well, not really. If you’re just talking about them, yeah maybe. But talking about a WordPress Theme doesn’t make one. Are they so simple when you actually try and make a WordPress Theme that follows these principles?

No. Not really.

First of all, it’s relatively easy to design a WordPress Theme knowing it will only be used by people who have a specific purpose for it. You only download a WordPress Theme if you want to use it, right? Well, how do you design a WordPress Theme that will be forced on people? Most especially, forced on people who are new to WordPress? People who may take one look at the Default Theme and slap their monitors in horror lest they look on something so hideous, so, so limiting ever again?

Plus, who says a Default Theme should look like a “blog” Theme?

And, while knowing that most people start their WordPress-theming with the Default Theme and, increasingly, their web designing with the Default Theme—knowing and suffering under that awful pressure and responsibility—how do you make it easy to tweak simply and make it easy to Child Theme—without turning it into a Framework Theme.

Trust me here. While people may be asking for a Framework as the Default Theme they’re not all asking for the same thing. Something as robust as Thematic will have people running screaming away from it. People that want Framework Themes can download Framework Themes. I’m not so sure every new user should have one forced on them.

Continue reading “An Idea for a New Default Theme for WordPress—Introducing Kirby”