<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Theme Foundry &#187; From the workshop</title>
	<atom:link href="http://thethemefoundry.com/blog/category/from-the-workshop/feed/" rel="self" type="application/rss+xml" />
	<link>http://thethemefoundry.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Wed, 16 May 2012 20:26:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Querying posts with a false or NULL meta value</title>
		<link>http://thethemefoundry.com/blog/query-posts-wordpress-false-null-meta-value/</link>
		<comments>http://thethemefoundry.com/blog/query-posts-wordpress-false-null-meta-value/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 00:26:03 +0000</pubDate>
		<dc:creator>Andy Adams</dc:creator>
				<category><![CDATA[From the workshop]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/?p=7343</guid>
		<description><![CDATA[As I was working on our latest theme, I came across a situation where I needed to filter out posts that had a specific meta key that either never was set (NULL) or was false. I started down the route of using the meta_query argument to WP_Query. $query_args = array( 'meta_query' => array( array( 'key' [...]]]></description>
			<content:encoded><![CDATA[<p>As I was working on our latest theme, I came across a situation where I needed to filter out posts that had a specific meta key that either <em>never was set</em> (NULL) or was <em>false</em>. I started down the route of using the <code>meta_query</code> argument to <strong>WP_Query</strong>.</p>

<span id="more-7343"></span>

<pre lang="php">
$query_args = array(
    'meta_query' => array(
        array(
            'key' => 'my_key',
            'value' => false,
            'type' => 'BOOLEAN'
        )
    )
);
</pre>

<p>This works for the <em>false</em> case, but not for the <em>NULL</em> case. As I did a bit of searching, I found <a href="http://core.trac.wordpress.org/ticket/18158">this core ticket</a> which is going to allow searching for NULL meta values in WordPress 3.4. However, I had 2 problems with this solution:</p>

<ol>
<li>WordPress 3.4 isn&#8217;t out yet (duh) and we need to support a couple of versions back, anyhow.</li>
<li>I needed to modify the main query. Tacking on items to the <code>meta_query</code> is error prone once someone else (a plugin, for example) tries to modify it as well. Specifically, the <code>relation</code> argument causes issues:</li>
</ol>

<pre lang="php">
$query_args = array(
    'meta_query' => array(
        'relation' => 'OR',
        array(
            'key' => 'my_key',
            'value' => false,
            'type' => 'BOOLEAN'
        ),
        array(
            'key' => 'my_key',
            'compare' => 'NOT EXISTS'
        )
    )
);
</pre>

<p>The above code would work as long as no other plugin needed to use the <code>meta_query</code>. But what if a plugin tried to modify the query args with their own keys and values?</p>

<pre lang="php">
$plugin_query_args = array(
    'meta_query' => array(
        'relation' => 'AND',
        array(
            'key' => 'their_first_key',
            'value' => true,
            'type' => 'BOOLEAN'
        ),
        array(
            'key' => 'their_second_key',
            'value' => true,
            'type' => 'BOOLEAN'
        )
    )
);
</pre>

<p>You&#8217;ll notice the <code>relation</code> values would conflict, since WordPress only allows one <code>meta_query</code> at a time. That means we need another method to check for <em>false</em> or <em>NULL</em> values. After a bit of digging around, I pieced together this SQL-based solution:</p>

<pre lang="php">
add_filter( 'posts_join', 'lets_modify_the_posts_join' );
add_filter( 'posts_where', 'lets_modify_the_posts_where' );

function lets_modify_the_posts_join( $clause='' ) {
    global $wpdb;

    // We join the postmeta table so we can check the value in the WHERE clause.
    $clause .= " LEFT JOIN $wpdb->postmeta AS my_postmeta ON ($wpdb->posts.ID = my_postmeta.post_id AND my_postmeta.meta_key = 'my_key') ";
    
    return $clause;
}

function lets_modify_the_posts_where( $clause='' ) {
    global $wpdb;

    // Check whether the value is false or NULL. If it is neither, then we want to filter it.
    $clause .= " AND ( (my_postmeta.meta_key = 'my_key' AND CAST(my_postmeta.meta_value AS CHAR) = '') OR my_postmeta.meta_id IS NULL ) ";

    return $clause;
}
</pre>

<p>What we&#8217;re doing here is adding a JOIN statement to the query that joins the <code>wp_postmeta</code> table on the key &#8220;my_key&#8221;. We join the table as &#8220;my_postmeta&#8221; in the example.</p>

<p>Then, we&#8217;re adding a condition to the WHERE clause to check if the <code>my_postmeta.meta_value</code> is either <em>false</em> or <em>NULL</em>.</p>

<p>I hope this is useful to somebody out there. If I&#8217;ve overlooked some easier way to do this, let me know in the comments &#8211; thanks!</p>
 <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=7343" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/query-posts-wordpress-false-null-meta-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twenty Twelve: First sketches</title>
		<link>http://thethemefoundry.com/blog/twenty-twelve-first-sketches/</link>
		<comments>http://thethemefoundry.com/blog/twenty-twelve-first-sketches/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 16:21:37 +0000</pubDate>
		<dc:creator>Drew Strojny</dc:creator>
				<category><![CDATA[From the workshop]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/?p=7304</guid>
		<description><![CDATA[At the end of last year Matt and Lance contacted me and asked if I&#8217;d be interested in designing Twenty Twelve, the default WordPress theme for this year. I was of course honored and excited, and after some discussion about expectations and details, we started the project in relative secrecy. After a fast start, Twenty [...]]]></description>
			<content:encoded><![CDATA[<p>At the end of last year <a href="http://ma.tt">Matt</a> and <a href="http://simpledream.net/">Lance</a> contacted me and asked if I&#8217;d be interested in designing Twenty Twelve, the default WordPress theme for this year. I was of course honored and excited, and after some discussion about expectations and details, we started the project in relative secrecy.</p>

<p>After a fast start, Twenty Twelve development slowed to a crawl in February (which was my fault) and in March we decided including it in WordPress 3.4 wasn&#8217;t a good idea. Since then we&#8217;ve re-focused, moved the <a href="https://github.com/thethemefoundry/twentytwelve">Twenty Twelve repository</a> to Github, and established a regular work schedule to ensure it&#8217;s ready for WordPress 3.5.</p>

<span id="more-7304"></span>

<p>If you&#8217;re following along over on Github, expect to see commits going in on Wednesday and Thursday mornings. Right now the team is small: Lance and I are working on the code and chatting with Matt and <a href="http://nacin.com/">Nacin</a> as required over Skype. We may be small, but we&#8217;re more than happy to accept bug fixes and suggestions in the form of <a href="http://help.github.com/send-pull-requests/">pull requests</a>. In fact, a few folks have already chipped in &mdash; thanks <a href="http://en.wp.obenland.it/">Konstantin Obenland</a> and <a href="http://jeffsebring.com/">Jeff Sebring</a>!</p>

<p>Over the next few months I&#8217;ll be posting more about the decisions and discussions we&#8217;ve made and had while building Twenty Twelve. At first, these will be a bit backdated, but the posts will slowly catch up as we move along. We&#8217;ll also put up a live demo site sometime soon, so you can see Twenty Twelve in action!</p>

<h2>First sketches</h2>

<p><img src="http://thethemefoundry.com/wp-content/uploads/2012/04/2012-first-sketch-1.jpg" alt="First sketch #1" title="First sketch #1" class="alignnone size-full wp-image-7306" /></p>

<p>First sketches are a basic overview for the direction of the theme. It&#8217;s the first thing I do when I sit down to design a theme. They don&#8217;t set anything in stone, but they set the tone and aesthetic for the design. The goal here was to avoid anything fancy, whimsical, or tricky. The focus for the theme will be clean lines, precise spacing, and great typography. Twenty Twelve should be a joy to read.</p>

<p><img src="http://thethemefoundry.com/wp-content/uploads/2012/04/2012-first-sketch-2.jpg" alt="First sketch #2" title="First sketch #2" class="alignnone size-full wp-image-7307" /></p>

<p>These sketches were completed back in January, and some things have changed since then, but the general look and feel of the theme has stayed the same. In the next few posts we&#8217;ll dive a little deeper and take a look at some of the decisions we&#8217;ve made so far. Stay tuned!</p>
 <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=7304" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/twenty-twelve-first-sketches/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Toggle an extra row of buttons with WordPress</title>
		<link>http://thethemefoundry.com/blog/toggle-an-extra-row-of-buttons-with-wordpress/</link>
		<comments>http://thethemefoundry.com/blog/toggle-an-extra-row-of-buttons-with-wordpress/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 21:58:13 +0000</pubDate>
		<dc:creator>Andy Adams</dc:creator>
				<category><![CDATA[From the workshop]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/?p=6255</guid>
		<description><![CDATA[As a theme developer, there are situations when having some extra buttons on the content editor can come in handy. WordPress provides the mce_buttons_3 hook, which allows you to add buttons to a third row on the visual editor. However, by default this row will show no matter what, even when you toggle the &#8220;kitchen [...]]]></description>
			<content:encoded><![CDATA[<p>As a theme developer, there are situations when having some extra buttons on the content editor can come in handy. WordPress provides the <code>mce_buttons_3</code> hook, which allows you to add buttons to a third row on the visual editor.</p>

<p><img src="http://thethemefoundry.com/wp-content/uploads/2012/04/3rd-row-buttons-kitchen-sink-on.png" alt="3rd row of buttons with the kitchen sink on" title="3rd-row-buttons-kitchen-sink-on" class="aligncenter size-full wp-image-7019" /></p>

<p>However, by default this row will show <strong>no matter what</strong>, even when you toggle the &#8220;kitchen sink&#8221; on and off:</p>

<p><img src="http://thethemefoundry.com/wp-content/uploads/2012/04/3rd-row-buttons-kitchen-sink-off.png" alt="3rd row of buttons with the kitchen sink off" title="3rd-row-buttons-kitchen-sink-off.png" class="aligncenter size-full wp-image-7020" /></p>

<p>It seems more logical to toggle the third row on and off along with the rest of the advanced buttons. In fact, there is a <a href="http://core.trac.wordpress.org/ticket/9841">core ticket</a> dealing with this very situation. <span id="more-6255"></span></p>

<p>In searching around, I discovered a <a href="http://wordpress.stackexchange.com/questions/13729/is-there-a-way-to-add-another-row-to-the-tinymce-kitchen-sink-toggle">WordPress StackExchange thread</a> that described my exact problem &#8211; but without a solution to the toggle issue.</p>

<p>I decided to dig into the TinyMCE API and write my own little jQuery function to handle it. You can add this code directly to your TinyMCE plugin init call:</p>

<pre lang="javascript">init : function( ed, url ) {
    ed.onInit.add(function( ed ) {
        if ( getUserSetting( 'hidetb', '0' ) == '0' ) {
            jQuery( '#content_toolbar3' ).hide();
        }

        jQuery( '#wp-content-editor-container #content_wp_adv' ).click(function() {
            if ( jQuery( '#content_toolbar2' ).is( ':visible' ) ) {
                jQuery( '#content_toolbar3' ).show();
            } else {
                jQuery( '#content_toolbar3' ).hide();
            }
        });
    });
}</pre>

<p>Once you add this snippet to your editor plugin JavaScript, your extra row of buttons will toggle on and off along with the other advanced buttons:</p>

<p><img src="http://thethemefoundry.com/wp-content/uploads/2012/04/3rd-row-buttons-hidden.png" alt="Hidden row of buttons" title="3rd-row-buttons-hidden" class="aligncenter size-full wp-image-7026" /></p>

<p>Let me know if it works for you!</p>

<p><strong>Additional resources for writing your own TinyMCE plugin:</strong></p>

<ul>
<li><a href="http://codex.wordpress.org/TinyMCE_Custom_Buttons">WordPress Codex page for custom buttons</a></li>
<li><a href="http://www.tinymce.com/wiki.php/Creating_a_plugin">Writing a TinyMCE plugin</a></li>
</ul>
 <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=6255" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/toggle-an-extra-row-of-buttons-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How WordPress made us more productive</title>
		<link>http://thethemefoundry.com/blog/how-wordpress-made-us-more-productive/</link>
		<comments>http://thethemefoundry.com/blog/how-wordpress-made-us-more-productive/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 18:19:40 +0000</pubDate>
		<dc:creator>Andy Adams</dc:creator>
				<category><![CDATA[From the workshop]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/?p=4764</guid>
		<description><![CDATA[At a small company, the &#8220;Jack of all trades&#8221; is often more valuable than the &#8220;Master of one&#8221;. Each team member must wear a number of hats at any given time. When I&#8217;m helping our awesome customers I wear my support cap, and when I&#8217;m working on themes I put on my coder helmet. Previously, [...]]]></description>
			<content:encoded><![CDATA[<p>At a small company, the &#8220;Jack of all trades&#8221; is often more valuable than the &#8220;Master of one&#8221;. Each team member must wear a number of hats at any given time. When I&#8217;m helping our awesome customers I wear my support cap, and when I&#8217;m working on themes I put on my coder helmet. Previously, my least favorite hat was the documentation <a href="http://en.wikipedia.org/wiki/Ushanka">ushanka</a> &#8211; the &#8220;docushanka&#8221;. Bulky, uncomfortable, and when you wear it, you know you&#8217;re going somewhere unpleasant. But, that all changed when we rolled over to our new site.</p>

<span id="more-4764"></span>

<h2>It was about time</h2>

<p>Now that we&#8217;ve moved completely to WordPress all of our content is actually managed by &#8211; <strong>guess what</strong> &#8211; a Content Management System! All tutorials, documentation, theme pages and generic content pages (About, Contact, etc) were previously hand-edited HTML/PHP files. Making updates to the documentation involved:</p>

<ol>
<li>Writing the copy locally and committing to Git.</li>
<li>Creating and formatting any necessary images and adding them to the Git repository.</li>
<li>Adding links elsewhere on the site to the new content.</li>
<li>Ask the team to review changes, which meant they had to pull the repository.</li>
<li>Deploying the changes and images to the live server.</li>
</ol>

<p>That meant content and images were generally not visible to the whole team until they were checked into Git, and it created incredible friction when it came to updating documentation. I know I personally avoided adding images because it was such a pain to get things to work &#8220;just right&#8221;. It was a process that is better suited for code and not content.</p>

<h2>New and improved workflow</h2>

<p>Now, we&#8217;ve simplified our workflow:</p>

<ol>
<li>Write or edit your content and insert images in WordPress.</li>
<li>Ask for review if necessary.</li>
<li>&#8220;Publish&#8221; and you&#8217;re done!</li>
</ol>

<p>Most links are managed by WordPress and automatically updated &#8211; for example, publishing a new theme immediately makes it available on the <a href="http://thethemefoundry.com/wordpress/">theme index page</a>.</p>

<p>Now, there are times where we want to do some local development &#8211; maybe Scott wants to test some new headings for blog posts. I wrote <a href="https://gist.github.com/2030363">some pulldown scripts</a> using <a href="https://github.com/capistrano/capistrano/">Capistrano</a> with the <a href="https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension">multistage extension</a> to make this possible.</p>

<p>Content (including uploads) is pulled down from the production server to the staging server, which is a nearly-exact replica of the production machine. Then, we pull the content from the staging server to our local machines, which means we can develop locally with a copy of the live content easily.</p>

<p>Before the switch, content flowed from Development &rarr; Live. Now, we&#8217;ve completely reversed the flow: Live &rarr; Staging &rarr; Development. This is separate from code changes, which still go Development &rarr; Staging &rarr; Live (and they should, as Mark Jaquith dutifully pointed out in his <a href="http://wordpress.tv/2011/08/20/mark-jaquith-scaling-servers-and-deploys-oh-my/">WCSF 2011 talk</a>).</p>

<p>The WordPress-powered site removes the friction I mentioned earlier, making documentation and copywriting tweaks quick and easy. We&#8217;re now using the full potential of WordPress to power our entire site, instead of only using it for our blog. It&#8217;s refreshing to trust WordPress to manage all of our content, because it allows us focus on improving the other aspects of the site.</p>

<h2>That&#8217;s great, but what&#8217;s under the hood?</h2>

<p>Our content is broken down into a few Custom Post Types, beyond the normal Posts and Pages:</p>

<p><img src="http://thethemefoundry.com/wp-content/uploads/2012/03/post-types.png" alt="" title="post-types" class="aligncenter size-full wp-image-4792" /></p>

<ul>
<li>Themes &#8211; One for each dazzling theme we release.</li>
<li>Stories &#8211; Success tales from our actual customers.</li>
<li>Tutorials &#8211; Documentation and guides for our paid customers.</li>
</ul>

<p>We use custom taxonomies for each of these Post Types. Currently, the taxonomies are used to decide which Themes/Stories/Tutorials are &#8220;featured&#8221; in various places on our site.</p>

<p>In addition to the taxonomies, we&#8217;re using a handful of custom meta data fields on each of the post types. For example, each Story belongs to a Theme, so we store that with the Story:</p>

<p><img src="http://thethemefoundry.com/wp-content/uploads/2012/03/story-meta.png" alt="" title="story-meta" class="aligncenter size-full wp-image-4789" /></p>

<p>Similar meta data is stored for Themes:</p>

<p><img src="http://thethemefoundry.com/wp-content/uploads/2012/03/theme-meta.png" alt="" title="theme-meta" class="aligncenter size-full wp-image-4790" /></p>

<h2>Plugins</h2>

<p>We&#8217;re also using a few plugins to help power the new site.</p>

<ul>
<li><a href="http://wordpress.org/extend/plugins/akismet/">Akismet</a> &#8211; Foil nasty spammers.</li>
<li><a href="http://bbpress.org">bbPress</a> &#8211; Powers the customer support section of our new Help Center.</li>
<li><a href="http://wordpress.org/extend/plugins/markdown-on-save-improved/">Markdown on Save Improved</a> &#8211; We love <a href="http://daringfireball.net/projects/markdown/">Markdown</a>, and this plugin makes it easy to use with WordPress.</li>
<li>Memberful WP &#8211; Handles single sign on and integration with <a href="http://memberful.com">Memberful</a>.</li>
<li><a href="http://wordpress.org/extend/plugins/multiple-post-thumbnails/">Multiple Post Thumbnails</a> &#8211; Use multiple Featured Images in a post.</li>
<li><a href="http://vaultpress.com/">VaultPress</a> &#8211; Real-time offsite backups of our precious data.</li>
</ul>

<h2>Wrapping it all up</h2>

<p>So what does all this WordPress goodness amount to? Well, it has offered a few clear advantages:</p>

<ul>
<li>Previously, WordPress only powered our blog. Now, it powers all of our content &#8211; and that means that we&#8217;re <a href="http://en.wikipedia.org/wiki/Eating_your_own_dog_food">dogfooding it</a> even more, bringing us closer to the experience of most of our customers. Heck, according to the WP 2011 survey most WordPress users have WordPress acting as a CMS <em>only</em>, so we needed to get with the times!</li>
<li>Our documentation and marketing copy have improved already, due to the ease of revisions. Small copy tweaks that would&#8217;ve taken 15 minutes to deploy on the old system take 15 seconds now.</li>
<li>Reviewing the material before a release used to be a mish-mash of &#8220;sharing&#8221; methods. Sometimes we&#8217;d check it into Git and push for everyone to read and sometimes we&#8217;d post rough drafts in Basecamp. Now, we just write our draft in WordPress and publish when a new theme is released. Condensed, consolidated and simplified.</li>
</ul>

<p>I think the last point can&#8217;t be overstated &#8211; consolidating your workflow into one place does major things for your productivity. No more lost bits of information scattered over multiple sources. Instead, you have a canonical place for your content, reducing the clutter and allowing you to just…write.</p>

<p>All of this sums up to a much better content publishing experience. Like I mentioned, I used to dread publishing to our site. But now I&#8217;m actually excited to work on our documentation posts and to write blog posts like this one.</p>
 <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=4764" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/how-wordpress-made-us-more-productive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coming of age</title>
		<link>http://thethemefoundry.com/blog/coming-of-age/</link>
		<comments>http://thethemefoundry.com/blog/coming-of-age/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 17:43:27 +0000</pubDate>
		<dc:creator>Andy Adams</dc:creator>
				<category><![CDATA[From the workshop]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/?p=4320</guid>
		<description><![CDATA[I&#8217;d like to tell you a quick story. A story about a website, actually. You might even call it a &#8220;coming of age&#8221; tale. Behind every good website there&#8217;s a person (or people) and, in many cases, a business. And behind every rework and redesign, there is a reason &#8211; a &#8220;why&#8221; before the &#8220;how&#8221;, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to tell you a quick story. A story about a website, actually. You might even call it a &#8220;coming of age&#8221; tale.</p>

<p>Behind every good website there&#8217;s a person (or people) and, in many cases, a business. And behind every rework and redesign, there is a reason &#8211; a &#8220;why&#8221; before the &#8220;how&#8221;, if you will. I wanted to touch on that a little bit. Don&#8217;t worry &#8211; we&#8217;ll get to the custom post types, bleeding edge this-and-that and JavaScript whizbangs for you propeller heads before long!</p>

<p>But first, let&#8217;s review the story up to this point.</p>

<span id="more-4320"></span>

<p>Back in 2008, Drew and Jennifer started what would eventually become The Theme Foundry with plenty of blood, sweat and tears to mark the trail.</p>

<p>Since then, the business has grown and moved from</p>

<ol>
<li>Drew and Jennifer going it alone, to&#8230;</li>
<li>Working with a handful of contractors, to&#8230;</li>
<li>Hiring two full-time employees (Scott and myself) and <a href="http://jestro.com/jobs.html">looking for another</a></li>
</ol>

<p>We&#8217;ve also expanded our themes to the <a href="http://themes.wordpress.com/themes/search/thethemefoundry">WordPress.com marketplace</a> and moved into a totally new and foreign (and exciting!) realm with <a href="http://memberful.com">Memberful</a>, our still in development <a href="http://en.wikipedia.org/wiki/Software_as_a_service">SaaS</a> offering for selling digital products.</p>

<p>2012 is an exciting year for this company. And with all the growth going on, it was time to not only add a fresh coat of paint, but completely rework the website that powered the business.</p>

<p>The old website grew organically out of need &#8211; a handful of static pages, WordPress powering the blog, bbPress 1.0 Alpha powering the forums, and aMember (*<em>shudder</em>*) managing the selling of themes.</p>

<p>If our old website were a bicycle, it might look <a href="http://www.jimmykuehnle.com/artblog/2010/06/four-person-bicycle/">something like this</a> (with Drew supplying the Fred-Flinstone-esque leg power).</p>

<p>As of February 18th, 2012, we&#8217;ve officially &#8220;switched over&#8221; to a more powerful and elegant solution, featuring:</p>

<ul>
<li>A single WordPress installation</li>
<li><a href="http://bbpress.org/">bbPress 2.1</a></li>
<li>Memberful integration (yep, we&#8217;re <a href="http://en.wikipedia.org/wiki/Eating_your_own_dog_food">dogfooding it</a>!)</li>
</ul>

<p>I hope you&#8217;ll join me in the coming days as I do my best to chronicle some of the decisions we made and discussions we had along the way.</p>
 <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=4320" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/coming-of-age/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>From the workshop: Don&#8217;t steal my Theme Options</title>
		<link>http://thethemefoundry.com/blog/from-the-workshop-dont-steal-my-theme-options/</link>
		<comments>http://thethemefoundry.com/blog/from-the-workshop-dont-steal-my-theme-options/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 22:15:16 +0000</pubDate>
		<dc:creator>Andy Adams</dc:creator>
				<category><![CDATA[From the workshop]]></category>

		<guid isPermaLink="false">http://thethemefoundry.com/blog/?p=3161</guid>
		<description><![CDATA[Here at The Theme Foundry we take the craft of WordPress theming seriously. We’re constantly scrutinizing everything: how we code the themes, what features we want to add, and ultimately what features we need to leave out. While developing our latest theme Duet, we had some passionate discussion about theme options. There are some themes [...]]]></description>
			<content:encoded><![CDATA[<p>Here at The Theme Foundry we take the craft of WordPress theming seriously. We’re constantly scrutinizing everything: <a href="http://forge.thethemefoundry.com/">how we code the themes</a>, what features we want to add, and ultimately what features we need to leave out. While developing our latest theme <a href="http://thethemefoundry.com/duet/">Duet</a>, we had some passionate discussion about theme options.</p>
<p>There are some themes that are designed to serve nearly any purpose under the sun – and they contain a vast amount of configurable options on the backend to help you get your site “just like you want it”.</p>
<p>On the other hand, there are those who say themes should have zero (or as close to it as possible) options – the idea being that a theme should “just work”.</p>
<p>At The Theme Foundry, we tend to lean toward the “zero configuration” side. We think requiring extensive backend setup is a turn-off for the average user, so we gear our themes to work “out of the zip”.</p>
<p>With that in mind, I’d like to share a story with you about some lessons I learned while building Duet.</p>
<p><span id="more-3161"></span></p>
<h2>Developing a philosophy</h2>
<p>Personally, I’m <a href="http://thethemefoundry.com/blog/meet-andy-adams/">relatively new</a> to the WordPress theme space. As I’ve read over various WordPress development blogs and news sources, I’ve found that there seems to be a general outcry against too many options. In a <a href="http://wpcandy.com/podcasts/episode-027">recent WPCandy podcast</a>, Ryan Imel mentioned that developers should be shooting for zero theme options as an ideal. Andrew Nacin wrote recently about &#8220;<a href="http://nacin.com/2011/12/18/in-open-source-learn-to-decide/">learning to decide</a>&#8221; instead of just adding another option.</p>
<h2>Death to options!</h2>
<p>Such a compelling rallying cry – the thought of a theme that “just works” without a single configuration option seemed like a crystal-clear light to guide the way! I loved the principle so dearly, that during a company discussion, I suggested that we gear our efforts towards eliminating all options:</p>
<p><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/workshop/andy-reduce-options.png" alt="Reduce the theme options!" /></p>
<h2>Talk is cheap&#8230;</h2>
<p>The team rallied around the idea – we’d take a hatchet to options! At the time, we were working on our most recent release, <a href="http://thethemefoundry.com/duet/">Duet</a>. <a href="http://thethemefoundry.com/blog/welcome-scott/">Scott&#8217;s</a> design was focused on typography and a beautiful reading experience, and it had a number of options to tweak the appearance. Duet&#8217;s options page looked like this, fully expanded:</p>
<p style="text-align:center;"><a style="border-bottom:none;cursor: pointer;" href="http://thethemefoundry.com/wp-content/uploads/workshop/theme-options-original.png"><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/workshop/theme-options-original-thumb.png" alt="The original" /></a></p>
<p>We talked it over, and decided we&#8217;d go one-by-one through the options and scrutinize like madmen. Anticipating massive option slaying, we pictured the &#8220;after&#8221; screenshot to look something like this:</p>
<p><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/workshop/ideal-options.png" alt="Duet's ideal options screen." /></p>
<h2>The Ethos of the Logos</h2>
<p>Energized behind our new philosophy, we started with some substantial victories in the Logo Options section.</p>
<p><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/workshop/logo-options.png" alt="Logo options" /></p>
<p><em>We asked</em>: Do our users have any need to modify the alt text of their logo image?</p>
<p><em>The answer</em>: <strong>No</strong>. Of course not – the site title works wonderfully as the alt text (this is for their logo, after all). Chopped.</p>
<p><em>We asked</em>: Do we need an option to toggle the tagline display?</p>
<p><em>The answer</em>: <strong>No</strong>. The tagline is only used in the header, and if the user wants to remove it they can simply remove their tagline in their settings. Any more complicated tagline requirements they have can be handled through template modification and/or CSS changes. Consider it chopped.</p>
<p>Boom! Two options down right out of the gate. We were feeling pretty good at this point, and our strategy looked promising. But (you knew this was coming), as we started trying to chop some of our other options, we found ourselves at a bit of a crossroads.</p>
<h2>Color me unconvinced</h2>
<p><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/workshop/color-option.png" alt="Color options" /></p>
<p>The headings in Duet were a <a href="http://thethemefoundry.com/wp-content/uploads/workshop/duet-orange-scheme.png">nifty orange color</a> by default. Knowing that orange doesn’t suit everyone’s taste, we originally included an option for toggling the color of these headings to a color of your choosing, using a hex value and a color picker.</p>
<p><em>Then, we asked</em>: Is choosing the heading color something a user should have to deal with?</p>
<p><em>The answer</em>: <strong>No</strong> &#8211; but they need to be able to switch from orange. As theme designers, instead of leaving the user to try to find something that looks nice, we should be be providing some awesome choices that are stunning out of the box. It’s all about making the best <a href="http://wordpress.org/about/philosophy/">decisions</a> for the user, not adding options.</p>
<p>We decided to come up with some color schemes to choose from, which offered a few big advantages:</p>
<ul>
<li>Users didn’t have to mess around with hex color codes, trying to find a good fit.</li>
<li>We could add additional colors to compliment the main.</li>
<li>We could change the featured banner color (which uses image CSS <a href="http://css-tricks.com/pseudo-element-roundup/">pseudo-elements</a> to get the banner effect) to compliment the color scheme.</li>
</ul>
<p>Our slash-and-burn philosophy was starting to hit reality – and believe it or not, I started to feel a little anxiety. I wanted desperately to chop our options down to the bare minimum, and I suggested ways to get rid of the option:</p>
<ul>
<li>Provide tutorials on editing CSS that would show users how to modify their color schemes and select good colors.</li>
<li>Include the banner elements as PNG and PSD files so users could make their own.</li>
</ul>
<p>Drew and Scott quickly reminded me that requiring users to make modifications to their theme is a less than ideal experience. They weren’t buying it, so we kept the option.</p>
<p>So, after our changes we still had an option – but we felt it provided a better experience and prevented the user from having to make a nuanced design decision (that’s our job, after all) &#8211; instead, they had 3 lovely choices. I wasn’t thrilled, but I was overruled and we moved on to the next option for review.</p>
<h2>The great reversal</h2>
<p><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/workshop/post-display-options.png" alt="Post display options" /></p>
<p>Scott had included an option to control whether or not the tags would display on a post. If the user checked it, all tags would be hidden from all posts &#8211; aha! Something that could be easily controlled using CSS or a small template modification &#8211; victory was mine!</p>
<p><em>We asked</em>: Do our users really need to be able to hide the tags on their posts?</p>
<p><em>The answer</em>: <strong>No</strong>. <em>Except</em> that this is one of the most-requested modifications on any of our themes. Some people use tags, some people use categories, some use neither, and some use both. Hiding one or the other is useful to many of our users, and that’s something we’ve learned only through experience. It could be omitted, but we would then have to instruct users on how to modify the templates to remove tags or categories (not easy for the average user). </p>
<p><em>So, the real answer</em>: <strong>Maybe</strong>&#8230;?</p>
<p>This was a toss-up. The option wasn’t necessary, but experience told us that a toggle option would probably improve the user experience. At this point, I was actually going through a bit of <a href="http://en.wikipedia.org/wiki/Cognitive_dissonance">cognitive dissonance</a>.</p>
<p>On one hand, I wanted options to die. On the other hand, I realized that these options were born out of real use cases. I knew this because I handle requests for removing categories, tags and authors on a daily basis in support. Modifying template files is difficult for many of our users, and hiding via CSS is not a very clean solution.</p>
<p>In addition, we sell our themes on WordPress.com – where users are unable to modify their template files, and CSS changes <a href="http://en.support.wordpress.com/custom-design/custom-css/">cost extra</a>.</p>
<p>We left it in, and actually added a toggle for hiding the author and categories as well. It was sorta painful, but I was beginning to realize the flaw in my philosophy: It’s not about <strong>eliminating</strong> options, it’s about having the <strong>right</strong> options. I know, I know – hardly groundbreaking. It’s been said before by many wiser people than myself. But it’s very easy to get caught up in a philosophy without considering the real goal, which is making a pleasant experience for your users.</p>
<h2>Don&#8217;t steal my Theme Options</h2>
<p>And this is why I wanted to write this post &#8211; to counter-balance the anti-options, anti-configuration sentiment. It&#8217;s too easy to get caught up in a <a href="http://en.wikipedia.org/wiki/Cargo_cult_programming">cargo cult</a> &#8211; I know I did, briefly. Instead of making a theme either fully-customizable or configuration-free, I’ve realized that the ultimate goal is to add “just the right options” to make the user experience more pleasant. I think everybody would agree with that sentiment &#8211; but it&#8217;s easier said than done.</p>
<p>We continued through our options page, scrutinizing each one and considering ways to improve. We ended up reorganizing many options and adding a few (crazy reversal, huh?). Here’s what we ended up with, final (left) vs. original (right):</p>
<p style="text-align:center;"><a style="border-bottom:none;cursor: pointer;" href="http://thethemefoundry.com/wp-content/uploads/workshop/final-options.png"><img class="aligncenter" src="http://thethemefoundry.com/wp-content/uploads/workshop/final-options-thumb.png" alt="The final result" /></a></p>
<p>We actually ended up with more options (19 vs. the original 16). Many of our original options remained, though some were tweaked to be clearer. We added an option to control the drop cap styling on posts, since Duet is all about beautiful typography and we anticipated not everyone liking this aspect. Finally, we added some slider options that are commonly requested on our other themes.</p>
<p>And that brings me to the end of my story, a tale of a developer (and a team) who went from loving, to hating, to having a mutually beneficial relationship with options, all in a matter of weeks. It was a tremendous and rapid learning experience for all of us. We still have a lot to learn, but we’re making strides in providing top-notch experiences with each of our themes. <img src="http://thethemefoundry.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=3161" width="1" height="1" style="display: none;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://thethemefoundry.com/blog/from-the-workshop-dont-steal-my-theme-options/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

