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”

Custom Menu Code Samples

Do you find yourself taking older themes and adding support for Custom Menus? Here are code samples that you can use for just that.

To be clear, this isn’t a full-blown tutorial for Custom Menus. See Justin Tadlock’s excellent post, Goodbye, headaches. Hello, menus! or the wp_nav_menu Codex page for all the juicy details.

Continue reading “Custom Menu Code Samples”

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 );
}

?>

What Is The Automattic Theme Team?

So, just what is this Automattic Theme Team anyway? In a nutshell, we’re a bunch of people who really care about WordPress Themes and want to see them get better and better on WordPress.com and for every WordPress.org user. And this is our blog.

You’ll be hearing more from us individually in the coming weeks but I thought, to get started, it’d be a good idea to share a few of the team goals we’ve been discussing. Just some rough thoughts really. But I’m hoping that by sharing them here you can get a better idea of what we’re up to—and get as excited as I am about it all.

  1. Every WordPress.com user should feel like there’s a theme that fits them perfectly, that is exactly how they want to present themselves to the world, that they’re excited to show to their friends.
  2. We want everyone to feel a sense of momentum and ever-increasing possibilities, and to do so we will present as many perfect-fit WordPress themes to as many WordPress.com users as we can.
  3. We will ensure all of our public work represents the best in coding practices, web standards, and technical excellence.
  4. We will craft all of our themes to have consistent user experience and meet our users expectations and hopes.
  5. We will teach WordPress developers to become the best theme developers in the world. If you’re a WordPress theme developer—commercial or 100% free—we want to help you be the best.
  6. We will ensure all our improvements make it back to the open source community.

I love the idea of meeting the “expectations and hopes” of WordPress users by delivering to them the best in WordPress themes. Pretty, painless, perfect-fit ones that just plain work.

So, the Automattic Theme Team. We’re WordPress themers developing for the millions of users on WordPress.com who want to give back as much as possible to the WordPress theme community at large.

Let’s be awesome together.

I’ve Joined Automattic

Today marks the first day of my employment as a Theme Wrangler with Automattic and it feels great. I’m more than excited to finally let you know what I’ve been up to for the last little bit.

What can I say besides awesome, awesome, awesome? The enormous opportunity for learning and improvement; all the super-talented, friendly people; the chance to work on so many really, really cool projects—it’s almost unbelievable. This is a dream job for me.

So, yes, really excited. To say the least. And I don’t want to say too much right now so I’m going to keep this short. Though I imagine you have one very big question you’d like me to get to.

Continue reading “I’ve Joined Automattic”

Thematic 0.9.6.1 Is Live

Thanks to the always impressive Chris Gossmann we inch ever closer to Thematic version 1. Put your upgrade hats on and check out Thematic 0.9.6. As always you can download the latest version of Thematic from WordPress.org

Thanks to the always impressive Chris Gossmann we inch ever closer to Thematic version 1. Put your upgrade hats on and check out Thematic 0.9.6.1 As always you can download the latest version of Thematic from WordPress.org.

Continue reading “Thematic 0.9.6.1 Is Live”