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. :)

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

A Sample WordPress Theme Options Page

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

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

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

Get Thematic Version 0.9.5

It’s here! Thematic 0.9.5. A huge refinement of the Thematic Theme Framework—so huge that it’s only caution keeping me from calling it version 1.0. Chris Gossmann and I spent a lot of time on this version chopping down our personal to-do lists. Chris especially, making sure brilliant themes like the Gallery Theme are even easier to make. That’s right, even easier.

Here’s the quick list of what we’ve done to make Thematic easier for you to use.

  • Want to quickly find out what you can hook into and where? Browse through the cleaned up and organized extension files in the library. They’re logically organized and better documented.
  • Every last default widget ready area is hookable. Before, after, and in between.
  • We’ve added a hook before and after the main loops. You’ll be seeing a lot more magazine Child Themes I think.
  • The older/newer and post navigation is filterable.
  • Don’t want the Secondary Aside? Pull all the widgets out. The default widgets are no longer hard-coded into the sidebar template files.
  • You can move the comments template by unhooking it and injecting it somewhere else. Adding even more layout possibilities for creative designers.
  • More new dynamic body classes enabling surgically precise CSS work.

What it boils down to is this: I want you to be able to quickly develop powerful, rock-solid WordPress Themes with the Thematic Theme Framework. This version of Thematic just makes it even easier.

Of course, there’s more. As always thank you to everyone who’s contributed to the Thematic Theme Framework and this release. I’m getting pretty excited about Thematic and what it’s leading to. I hope you are too.

Download the Thematic Theme Framework and read how to modify WordPress Themes the smart way. It’ll change how you think about WordPress and WordPress Themes.