<?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>Thesis Theme User&#8217;s Guide</title>
	<atom:link href="http://diythemes.com/thesis/rtfm/feed/" rel="self" type="application/rss+xml" />
	<link>http://diythemes.com/thesis/rtfm</link>
	<description>Documentation, How-tos, and Best Practices for the Thesis WordPress Theme</description>
	<lastBuildDate>Thu, 17 May 2012 19:45:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Restore Corrupted Design Options</title>
		<link>http://diythemes.com/thesis/rtfm/restore-corrupted-design-options/</link>
		<comments>http://diythemes.com/thesis/rtfm/restore-corrupted-design-options/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 15:04:52 +0000</pubDate>
		<dc:creator>Shelley</dc:creator>
				<category><![CDATA[Thesis Options]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3305</guid>
		<description><![CDATA[If you are running the W3 Total Cache plugin, then start with Step 1. If you are not running the W3 Total Cache plugin, then start with Step 2. Disable Object Cache in W3 Total Cache&#8217;s configuration settings. Go to Thesis &#62; Design Options and note all of the current settings there (you&#8217;ll need to [...]]]></description>
			<content:encoded><![CDATA[</p>
<p class="alert">If you <strong>are</strong> running the W3 Total Cache plugin, then start with Step 1. If you <strong>are not</strong> running the W3 Total Cache plugin, then start with Step 2.</p>
<ol>
<li>Disable <strong>Object Cache</strong> in W3 Total Cache&#8217;s configuration settings.</li>
<li>Go to <strong>Thesis &gt; Design Options</strong> and note all of the current settings there (you&#8217;ll need to refer to them in Step 4).</li>
<li>Go to <strong>Thesis &gt; Manage Options</strong> and click &#8220;Restore Default Design Options&#8221;.</li>
<li>Go back to <strong>Thesis &gt; Design Options</strong>, and manually reconfigure the settings you noted from Step 2 (remember to click the SAVE button).</li>
</ol>
<h3 id="forward">Going Forward</h3>
<ul>
<li>Be sure to periodically download <a href="http://diythemes.com/thesis/rtfm/backup-thesis-database-options/">backups</a> of your Thesis Options &#8212; that way, if this issue comes up again, you can use &#8220;Upload Options&#8221; to restore the last &#8220;clean&#8221; (i.e., non-corrupted) Design Options backup file you have (in lieu of Steps 3 and 4 above).</li>
<li>Make sure you&#8217;re using the <a href="http://diythemes.com/thesis/downloads/">latest version of Thesis</a> &#8212; changes were made as of 1.8.4 in an attempt to reduce the chances for this issue to recur.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/restore-corrupted-design-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Paginate WordPress Posts</title>
		<link>http://diythemes.com/thesis/rtfm/nextpage-wordpress-posts/</link>
		<comments>http://diythemes.com/thesis/rtfm/nextpage-wordpress-posts/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 20:59:59 +0000</pubDate>
		<dc:creator>godhammer</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3170</guid>
		<description><![CDATA[Finishing a really long post? Does it feel &#8220;too long&#8221; in terms of the scrolling your visitors will need to do? You may want to consider &#8220;paginating&#8221; that 5,000 word monster article. Pagination breaks posts into shorter segments using the &#60;!--nextpage--&#62; quicktag. To avoid confusion, note that the &#60;!--more--&#62; quicktag is a related concept &#8212; [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>Finishing a really long post?</p>
<p>Does it feel &#8220;too long&#8221; in terms of the scrolling your visitors will need to do?</p>
<p>You may want to consider &#8220;paginating&#8221; that 5,000 word monster article.</p>
<p>Pagination breaks posts into shorter segments using the <code>&lt;!--nextpage--&gt;</code> quicktag.</p>
<p>To avoid confusion, note that the <code>&lt;!--more--&gt;</code> quicktag is a related concept &#8212; but the <a href="http://diythemes.com/thesis/rtfm/change-read-more-quick-tag-wordpress/"><em>more</em> quicktag</a> can only be used once on a given post, and &#8220;more&#8221; tends to be used as a lead-in for a post manually excerpted on the home page.</p>
<p>The <code>&lt;!--nextpage--&gt;</code> quicktag, by contrast, separates a post into as many URL units &#8212; as many &#8220;pages&#8221; &#8212; as you, the author, want.</p>
<p>Using &#8220;NextPage&#8221; also creates a visible set of numbers at the bottom of the content area.  If you have seven sections of a post, by using six <code>&lt;!--nextpage--&gt;</code> quicktags, you&#8217;d see pagination at the bottom of your post like so:</p>
<p><img class="aligncenter size-full wp-image-3175" title="Paginate a WordPress Post into Seperate Pages - URLs" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-post-nextpage-pagination.png" alt="Paginate a WordPress Post into Seperate Pages - URLs" width="555" height="352" /></p>
<p>If your permalink looked like this: <code>http://yoursite.com/my-post-name/</code> prior to pagination, it will still appear this way on the <em>first</em> section of the article.</p>
<p>However, each &#8220;nextpage&#8221; of your post will create an additional permalink extension.</p>
<p>Your fourth &#8220;next page&#8221; would look like this: <code>http://yoursite.com/my-post-name/4/</code> &#8212; notice the /4/ makes this a unique URL.</p>
<p>Paginated links are &#8220;dofollow&#8221; by default.  However, excessive use of pagination is an SEO consideration &#8212; the same <code>&lt;title&gt;</code> is repeated on each paginated URL of your post &#8212; and links such as &#8220;2&#8243; are not considered a prime use of anchor text.</p>
<p>In other words, while using the <code>&lt;!--nextpage--&gt;</code> quicktag can improve readability and increase average page view figures, pagination should be used with restraint to avoid dilution of PageRank &#8212; in other words, to maintain optimal SEO power.</p>
<p>As an additional note for Thesis users, if you a Thesis &#8220;post image&#8221; and <code>&lt;!--nextpage--&gt;</code> are used for the same post, your post image will appear at the top of <em>each</em> &#8220;paged post&#8221; URL.</p>
<p>The repetition of your post image is not necessarily a bad thing, and can help tie the paginated post together &#8212; but it&#8217;s a useful detail to know in advance.</p>
<h3>Customizing and Styling the NextPage &#8220;Post Pagination&#8221;</h3>
<p>You&#8217;ve got the concept of &#8220;splitting a post into multiple pages&#8221; (URLs) down.  But what if you want to change the text of &#8220;Pages:&#8221; to something else?</p>
<p>Maybe you&#8217;d like to add a solid CSS target for this area, which makes it easier to apply custom styles to paginated posts?</p>
<p>Let&#8217;s see if we can go from the look of the first &#8220;default nextpage quicktags&#8221; in the screen capture above to the following:</p>
<p><img class="aligncenter size-full wp-image-3172" title="Example of CSS Styled NextPage WordPress Paginated Formatting" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-post-nextpage-styling.png" alt="Example of CSS Styled NextPage WordPress Paginated Formatting" width="555" height="286" /></p>
<p>Above, the &#8220;2&#8243; represents the current &#8220;page number&#8221; of the segmented post &#8212; this is the section the visitor is actively viewing.</p>
<p>The red &#8220;5&#8243; demonstrates what your paginated &#8220;nextpage&#8221; quicktag links will do when a visitor hovers over the paginated links.</p>
<p>To format the &#8220;nextpage&#8221; section of text and numbers (as links) we can use a PHP filter.</p>
<p>In our filter below, the &#8220;Pages:&#8221; text will be replaced with &#8220;Sections &#8211;&#8221; instead.  You can use your own preferred text, of course.  In this filter, we&#8217;ll also wrap the entire area in a class-defined div for CSS purposes.</p>
<p>To begin your nextpage &#8220;paginated links&#8221; makeover, add the following to your <code>custom_functions.php</code> file contents:</p>
<pre class="php">function custom_nextpage_links($defaults) {
$args = array(
'before' =&gt; '&lt;div class="my-paginated-posts"&gt;&lt;p&gt;' . __('Sections &amp;#151;'),
'after' =&gt; '&lt;/p&gt;&lt;/div&gt;',
);
$r = wp_parse_args($args, $defaults);
return $r;
}
add_filter('wp_link_pages_args','custom_nextpage_links');</pre>
<p>For the color and style, add this to your <code>custom.css</code> file contents:</p>
<pre class="css">.custom .my-paginated-posts {
font-size:10px; font-weight:normal; font-family:arial; }

.custom .my-paginated-posts p { font-size:1.4em; }

.custom .my-paginated-posts p a {
background:#E8E8E8; color:#000; margin-left:0.6em; margin-right:0.6em;
padding:0.5em 0.7em; text-decoration:none; }

.custom .my-paginated-posts a:hover { color:#fff; background:#7F1315; }</pre>
<p>The combination of filter and CSS formatting takes the paginated &#8220;next page&#8221; navigational structure from this:</p>
<p><img class="aligncenter size-full wp-image-3173" title="Default formatting of NextPage quickcodes" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-nextpage-formatting-default.png" alt="Default formatting of NextPage quickcodes" width="369" height="25" /></p>
<p>To the more refined &#8220;nextpage&#8221; look shown below:</p>
<p><img class="aligncenter size-full wp-image-3174" title="Custom CSS Styling of WP NextPage Pagination Links" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-nextpage-formatting-customized.png" alt="Custom CSS Styling of WP NextPage Pagination Links" width="369" height="36" /></p>
<p>The selectors established can be used to further modify the design to your taste.</p>
<p>Now you know how to create multi-page posts &#8212; splitting longer posts into bite-sized units &#8212; and you know how to make the &#8220;nextpage&#8221; links look great, too!</p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/nextpage-wordpress-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thesis Skin Starter Template</title>
		<link>http://diythemes.com/thesis/rtfm/thesis-skin-starter-template/</link>
		<comments>http://diythemes.com/thesis/rtfm/thesis-skin-starter-template/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 17:16:01 +0000</pubDate>
		<dc:creator>mattonomics</dc:creator>
				<category><![CDATA[Advanced Customizations]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3253</guid>
		<description><![CDATA[Thesis makes building unique, custom designs easier than ever. This tutorial will show you just how simple it is. Before we get started, however, please familiarize yourself with the basic concepts of the Thesis Custom Loop API. Basic Template Let&#8217;s start with a very basic example. The first file you see is the one line [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>Thesis makes building unique, custom designs easier than ever. This tutorial will show you just how simple it is. Before we get started, however, please familiarize yourself with the basic concepts of the <a title="Thesis Custom Loop API" href="http://diythemes.com/thesis/rtfm/custom-loop-api/">Thesis Custom Loop API</a>.</p>
<h2>Basic Template</h2>
<p>Let&#8217;s start with a very basic example.</p>
<p>The first file you see is the one line of CSS for our basic example. We&#8217;ll be changing the body background to #000 (black). That is primarily there so we can see that we have successfully forced Thesis to regenerate the CSS.</p>
<p>The next file is the barebones custom_functions.php file. This is a skeleton class that will force Thesis to regenerate the CSS when the skin is initially installed. It is important to point out that this will only happen <strong>once</strong>.</p>
<ol>
<li>Copy/paste custom.css and custom_functions.php to your files in the custom folder (or you can <a title="Basic Skin Template" href="https://gist.github.com/gists/1936022/download">download the tar ball here</a>)</li>
<li>Once you&#8217;ve installed everything, visit any page on the admin side.</li>
<li>Look at your site. The body background should have changed to black.</li>
</ol>
<p><div id="gist-1936022" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">/*---:[ body ]:---*/</span></div><div class='line' id='LC2'><span class="nt">body</span><span class="nc">.custom</span> <span class="p">{</span> <span class="k">background</span><span class="o">:</span> <span class="m">#000</span><span class="p">;</span> <span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1936022/bec52579ac0f0db264ae743ceb7ca35c7f5e2fa0/custom.css" style="float:right;" rel="nofollow">view raw</a>
            <a href="https://gist.github.com/1936022#file_custom.css" style="float:right;margin-right:10px;color:#666" rel="nofollow">custom.css</a>
            <a href="https://gist.github.com/1936022" rel="nofollow">This Gist</a> brought to you by <a href="http://github.com" rel="nofollow">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="c1">// deny direct access</span></div><div class='line' id='LC3'><span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="nb">defined</span><span class="p">(</span><span class="s1">&#39;ABSPATH&#39;</span><span class="p">))</span></div><div class='line' id='LC4'>	<span class="k">die</span><span class="p">(</span><span class="s1">&#39;Please do not directly access this file&#39;</span><span class="p">);</span></div><div class='line' id='LC5'><br/></div><div class='line' id='LC6'><span class="k">class</span> <span class="nc">thesis_skin_example</span> <span class="k">extends</span> <span class="nx">thesis_custom_loop</span> <span class="p">{</span></div><div class='line' id='LC7'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">__construct</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC8'>		<span class="k">parent</span><span class="o">::</span><span class="na">__construct</span><span class="p">();</span> <span class="c1">// this &quot;activates&quot; the Custom Loop API</span></div><div class='line' id='LC9'>		<span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;init&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="nv">$this</span><span class="p">,</span> <span class="s1">&#39;init&#39;</span><span class="p">));</span></div><div class='line' id='LC10'>	<span class="p">}</span></div><div class='line' id='LC11'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">init</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC12'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">actions</span><span class="p">();</span></div><div class='line' id='LC13'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">filters</span><span class="p">();</span></div><div class='line' id='LC14'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">switch_skin</span><span class="p">();</span></div><div class='line' id='LC15'>	<span class="p">}</span></div><div class='line' id='LC16'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">actions</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC17'>		<span class="c1">// add and remove actions here</span></div><div class='line' id='LC18'>	<span class="p">}</span></div><div class='line' id='LC19'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">filters</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC20'>		<span class="c1">// add and remove filters here</span></div><div class='line' id='LC21'>	<span class="p">}</span></div><div class='line' id='LC22'>	<span class="k">private</span> <span class="k">function</span> <span class="nf">switch_skin</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC23'>		<span class="c1">//	Since after_switch_theme won&#39;t run, let&#39;s make sure that we generate the CSS</span></div><div class='line' id='LC24'>		<span class="k">if</span> <span class="p">(</span><span class="nx">is_admin</span><span class="p">()</span> <span class="o">&amp;&amp;</span> <span class="o">!</span> <span class="nx">get_option</span><span class="p">(</span><span class="nx">__CLASS__</span> <span class="o">.</span> <span class="s1">&#39;_generate&#39;</span><span class="p">))</span> <span class="p">{</span></div><div class='line' id='LC25'>			<span class="nx">thesis_generate_css</span><span class="p">();</span></div><div class='line' id='LC26'>			<span class="nx">update_option</span><span class="p">(</span><span class="nx">__CLASS__</span> <span class="o">.</span> <span class="s1">&#39;_generate&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span></div><div class='line' id='LC27'>			<span class="nx">wp_cache_flush</span><span class="p">();</span> <span class="c1">// flush the cache so things don&#39;t break!</span></div><div class='line' id='LC28'>		<span class="p">}</span></div><div class='line' id='LC29'>		<span class="k">else</span> <span class="k">return</span> <span class="k">null</span><span class="p">;</span></div><div class='line' id='LC30'>	<span class="p">}</span></div><div class='line' id='LC31'><br/></div><div class='line' id='LC32'>	<span class="c1">// below this line, use methods from the Custom Loop API.</span></div><div class='line' id='LC33'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">home</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC34'>		<span class="nx">thesis_loop</span><span class="o">::</span><span class="na">home</span><span class="p">();</span> <span class="c1">// remove this line and put your own home loop here</span></div><div class='line' id='LC35'>	<span class="p">}</span></div><div class='line' id='LC36'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">archive</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC37'>		<span class="nx">thesis_loop</span><span class="o">::</span><span class="na">archive</span><span class="p">();</span> <span class="c1">// remove this line and put your own archive loop here</span></div><div class='line' id='LC38'>	<span class="p">}</span></div><div class='line' id='LC39'><span class="p">}</span></div><div class='line' id='LC40'><span class="k">new</span> <span class="nx">thesis_skin_example</span><span class="p">;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1936022/95fa2d7dd6a4ff7f7cbfac14ba4b150c231f0bf3/custom_functions.php" style="float:right;" rel="nofollow">view raw</a>
            <a href="https://gist.github.com/1936022#file_custom_functions.php" style="float:right;margin-right:10px;color:#666" rel="nofollow">custom_functions.php</a>
            <a href="https://gist.github.com/1936022" rel="nofollow">This Gist</a> brought to you by <a href="http://github.com" rel="nofollow">GitHub</a>.
          </div>
        </div>
</div>
</p>
<h2>Advanced Template</h2>
<p>Obviously, a barebones skin class doesn&#8217;t really do much for the imagination. So, let&#8217;s take a look at a more advanced customization. Please read the notes in the code!</p>
<ol>
<li>Copy/paste custom.css and custom_functions.php to your files in the custom folder (or <a title="Advanced Skin Template" href="https://gist.github.com/gists/1942457/download">download the tar ball here</a>)</li>
<li>Once everything is installed, visit any page on the admin side.</li>
</ol>
<p>This class does a few things:</p>
<ul>
<li>strips the container from the nav menu</li>
<li>removes the default Thesis style.css</li>
<li>excludes the default &#8220;uncategorized&#8221; category from the home page</li>
<li>filters out some of the css related to the nav colors</li>
<li>applies a simple CSS reset ($this-&gt;css_reset) that is now a default part of the thesis_custom_loop class</li>
</ul>
<p><div id="gist-1942457" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">/*---:[ body ]:---*/</span></div><div class='line' id='LC2'><span class="nt">body</span> <span class="p">{</span> <span class="k">background</span><span class="o">:</span> <span class="m">#000</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC3'><br/></div><div class='line' id='LC4'><span class="c">/*---:[ menu ]:---*/</span></div><div class='line' id='LC5'><span class="nc">.menu</span> <span class="p">{</span> <span class="k">list-style</span><span class="o">:</span> <span class="k">none</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC6'>	<span class="nc">.menu</span> <span class="nt">li</span> <span class="p">{</span> <span class="k">float</span><span class="o">:</span> <span class="k">left</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC7'>		<span class="nc">.menu</span> <span class="nt">li</span> <span class="nt">a</span> <span class="p">{</span> <span class="k">text-decoration</span><span class="o">:</span> <span class="k">none</span><span class="p">;</span> <span class="k">display</span><span class="o">:</span> <span class="k">block</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC8'><br/></div><div class='line' id='LC9'><span class="c">/*---:[ post image fix from @kristarella ]:---*/</span></div><div class='line' id='LC10'><span class="nc">.post_image</span> <span class="p">{</span> <span class="k">max-width</span><span class="o">:</span> <span class="m">100</span><span class="o">%</span><span class="p">;</span> <span class="k">height</span><span class="o">:</span> <span class="k">auto</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC11'><br/></div><div class='line' id='LC12'><span class="c">/*---:[ widget lists ]:---*/</span></div><div class='line' id='LC13'><span class="nc">.sidebar_list</span> <span class="p">{</span> <span class="k">list-style</span><span class="o">:</span> <span class="k">none</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC14'><br/></div><div class='line' id='LC15'><span class="c">/*---:[ clearfixes ]---*/</span></div><div class='line' id='LC16'><span class="nf">#content_box</span><span class="nd">:after</span><span class="o">,</span> <span class="nc">.menu</span><span class="nd">:after</span> <span class="p">{</span> <span class="k">visibility</span><span class="o">:</span> <span class="k">hidden</span><span class="p">;</span> <span class="k">display</span><span class="o">:</span> <span class="k">block</span><span class="p">;</span> <span class="k">content</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">;</span> <span class="k">clear</span><span class="o">:</span> <span class="k">both</span><span class="p">;</span> <span class="k">height</span><span class="o">:</span> <span class="m">0</span><span class="p">;</span> <span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1942457/85d1f624d2332f19fb73319ac6e2008653ca1676/custom.css" style="float:right;" rel="nofollow">view raw</a>
            <a href="https://gist.github.com/1942457#file_custom.css" style="float:right;margin-right:10px;color:#666" rel="nofollow">custom.css</a>
            <a href="https://gist.github.com/1942457" rel="nofollow">This Gist</a> brought to you by <a href="http://github.com" rel="nofollow">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="c1">// Initial sanity check</span></div><div class='line' id='LC3'><span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="nb">defined</span><span class="p">(</span><span class="s1">&#39;ABSPATH&#39;</span><span class="p">))</span></div><div class='line' id='LC4'>	<span class="k">die</span><span class="p">(</span><span class="s1">&#39;Please do not directly access this file&#39;</span><span class="p">);</span></div><div class='line' id='LC5'><br/></div><div class='line' id='LC6'><span class="c1">// classes are a VERY important part of 2.0, so you need to be familiar with them.</span></div><div class='line' id='LC7'><br/></div><div class='line' id='LC8'><span class="k">class</span> <span class="nc">thesis_skin_example</span> <span class="k">extends</span> <span class="nx">thesis_custom_loop</span> <span class="p">{</span></div><div class='line' id='LC9'><br/></div><div class='line' id='LC10'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">__construct</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC11'>		<span class="c1">// run the parent constructor so we can access the thesis custom loop api</span></div><div class='line' id='LC12'>		<span class="k">parent</span><span class="o">::</span><span class="na">__construct</span><span class="p">();</span></div><div class='line' id='LC13'><br/></div><div class='line' id='LC14'>		<span class="c1">// run the main init</span></div><div class='line' id='LC15'>		<span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;init&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="nv">$this</span><span class="p">,</span> <span class="s1">&#39;init&#39;</span><span class="p">));</span></div><div class='line' id='LC16'>	<span class="p">}</span></div><div class='line' id='LC17'><br/></div><div class='line' id='LC18'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">init</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC19'>		<span class="c1">// actions and filters that will run on init. you could put other things here if you need.</span></div><div class='line' id='LC20'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">actions</span><span class="p">();</span></div><div class='line' id='LC21'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">filters</span><span class="p">();</span></div><div class='line' id='LC22'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">switch_skin</span><span class="p">();</span></div><div class='line' id='LC23'>	<span class="p">}</span></div><div class='line' id='LC24'><br/></div><div class='line' id='LC25'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">actions</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC26'>		<span class="c1">// add and remove actions here</span></div><div class='line' id='LC27'><br/></div><div class='line' id='LC28'>		<span class="c1">// modify the nav menu to exclude the div wrapper that WP defaults to</span></div><div class='line' id='LC29'>		<span class="nx">remove_action</span><span class="p">(</span><span class="s1">&#39;thesis_hook_before_header&#39;</span><span class="p">,</span> <span class="s1">&#39;thesis_nav_menu&#39;</span><span class="p">);</span></div><div class='line' id='LC30'>		<span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;thesis_hook_before_header&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="nv">$this</span><span class="p">,</span> <span class="s1">&#39;nav&#39;</span><span class="p">));</span></div><div class='line' id='LC31'>	<span class="p">}</span></div><div class='line' id='LC32'><br/></div><div class='line' id='LC33'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">filters</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC34'>		<span class="c1">// add and remove filters here</span></div><div class='line' id='LC35'><br/></div><div class='line' id='LC36'>		<span class="cm">/* </span></div><div class='line' id='LC37'><span class="cm">		*	Filter out the standard thesis style.css. </span></div><div class='line' id='LC38'><span class="cm">		*	Run this with a priority of 11 if you want to make sure the gravity forms css gets added.</span></div><div class='line' id='LC39'><span class="cm">		*/</span></div><div class='line' id='LC40'>		<span class="nx">add_filter</span><span class="p">(</span><span class="s1">&#39;thesis_css&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="nv">$this</span><span class="p">,</span> <span class="s1">&#39;css&#39;</span><span class="p">),</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">4</span><span class="p">);</span></div><div class='line' id='LC41'>	<span class="p">}</span></div><div class='line' id='LC42'><br/></div><div class='line' id='LC43'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">css</span><span class="p">(</span><span class="nv">$contents</span><span class="p">,</span> <span class="nv">$thesis_css</span><span class="p">,</span> <span class="nv">$style</span><span class="p">,</span> <span class="nv">$multisite</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC44'><br/></div><div class='line' id='LC45'>		<span class="c1">// filter the Thesis generated css. in this example we&#39;re removing all the nav styles related to color</span></div><div class='line' id='LC46'>		<span class="nv">$generated_css</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-&gt;</span><span class="na">filter_css</span><span class="p">(</span><span class="nv">$thesis_css</span><span class="o">-&gt;</span><span class="na">css</span><span class="p">);</span></div><div class='line' id='LC47'><br/></div><div class='line' id='LC48'>		<span class="cm">/* </span></div><div class='line' id='LC49'><span class="cm">		*	You can access the thesis_css object, which contains a variety of settings. </span></div><div class='line' id='LC50'><span class="cm">		*	As an example, I&#39;ll show you how to access nav text color.</span></div><div class='line' id='LC51'><span class="cm">		*	Remember that you can always do this in custom.css if you don&#39;t care about users having control over the colors </span></div><div class='line' id='LC52'><span class="cm">		*/</span></div><div class='line' id='LC53'>		<span class="nv">$my_css</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="se">n</span><span class="s2">/*---:[ my nav menu styles ]:---*/</span><span class="se">n</span><span class="s2">&quot;</span> <span class="c1">// it&#39;s always a good idea to add in comments as to what you&#39;re adding</span></div><div class='line' id='LC54'>			<span class="o">.</span> <span class="s2">&quot;.menu li a { color: #</span><span class="si">{</span><span class="nv">$thesis_css</span><span class="o">-&gt;</span><span class="na">nav</span><span class="p">[</span><span class="s1">&#39;link&#39;</span><span class="p">][</span><span class="s1">&#39;color&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"> }</span><span class="se">n</span><span class="s2">&quot;</span></div><div class='line' id='LC55'>			<span class="o">.</span> <span class="s2">&quot;.menu li a:hover { color: #</span><span class="si">{</span><span class="nv">$thesis_css</span><span class="o">-&gt;</span><span class="na">nav</span><span class="p">[</span><span class="s1">&#39;link&#39;</span><span class="p">][</span><span class="s1">&#39;hover&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"> }</span><span class="se">nn</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC56'><br/></div><div class='line' id='LC57'>		<span class="c1">// put in everything except the main thesis style.css. also add an initial css reset</span></div><div class='line' id='LC58'>		<span class="nv">$css</span> <span class="o">=</span> <span class="nv">$thesis_css</span><span class="o">-&gt;</span><span class="na">fonts_to_import</span> <span class="o">.</span> <span class="nv">$this</span><span class="o">-&gt;</span><span class="na">css_reset</span> <span class="o">.</span> <span class="nv">$generated_css</span> <span class="o">.</span> <span class="nv">$my_css</span><span class="p">;</span></div><div class='line' id='LC59'><br/></div><div class='line' id='LC60'>		<span class="c1">// return it</span></div><div class='line' id='LC61'>		<span class="k">return</span> <span class="nv">$css</span><span class="p">;</span></div><div class='line' id='LC62'>	<span class="p">}</span></div><div class='line' id='LC63'><br/></div><div class='line' id='LC64'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">filter_css</span><span class="p">(</span><span class="nv">$css</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC65'>		<span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="k">empty</span><span class="p">(</span><span class="nv">$css</span><span class="p">))</span> <span class="p">{</span></div><div class='line' id='LC66'><br/></div><div class='line' id='LC67'>			<span class="c1">// remove the nav colors</span></div><div class='line' id='LC68'>			<span class="k">if</span> <span class="p">(</span><span class="nb">preg_match</span><span class="p">(</span><span class="s1">&#39;|/*---:[ nav colors ]:---*/|i&#39;</span><span class="p">,</span> <span class="nv">$css</span><span class="p">))</span></div><div class='line' id='LC69'>				<span class="nv">$css</span> <span class="o">=</span> <span class="nb">preg_replace</span><span class="p">(</span><span class="s1">&#39;|/*---:[ nav colors ]:---*/(n.+){7}|i&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="nv">$css</span><span class="p">);</span></div><div class='line' id='LC70'><br/></div><div class='line' id='LC71'>			<span class="c1">// you could add more filtering here</span></div><div class='line' id='LC72'>		<span class="p">}</span></div><div class='line' id='LC73'>		<span class="k">return</span> <span class="nv">$css</span><span class="p">;</span></div><div class='line' id='LC74'>	<span class="p">}</span></div><div class='line' id='LC75'><br/></div><div class='line' id='LC76'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">nav</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC77'>		<span class="c1">// we&#39;re doing this so we can remove the default container div output by WordPress</span></div><div class='line' id='LC78'>		<span class="k">global</span> <span class="nv">$thesis_site</span><span class="p">;</span></div><div class='line' id='LC79'>		<span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;wp_nav_menu&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nv">$thesis_site</span><span class="o">-&gt;</span><span class="na">nav</span><span class="p">[</span><span class="s1">&#39;type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;wp&#39;</span><span class="p">)</span> <span class="p">{</span> <span class="c1">#wp</span></div><div class='line' id='LC80'>			<span class="nv">$args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC81'>				<span class="s1">&#39;theme_location&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;primary&#39;</span><span class="p">,</span></div><div class='line' id='LC82'>				<span class="s1">&#39;container&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;&#39;</span><span class="p">,</span></div><div class='line' id='LC83'>				<span class="s1">&#39;fallback_cb&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;thesis_nav_default&#39;</span></div><div class='line' id='LC84'>			<span class="p">);</span></div><div class='line' id='LC85'>			<span class="nx">wp_nav_menu</span><span class="p">(</span><span class="nv">$args</span><span class="p">);</span> <span class="c1">#wp</span></div><div class='line' id='LC86'>			<span class="k">echo</span> <span class="s2">&quot;</span><span class="se">n</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC87'>		<span class="p">}</span></div><div class='line' id='LC88'>		<span class="k">else</span></div><div class='line' id='LC89'>			<span class="nx">thesis_nav_default</span><span class="p">();</span></div><div class='line' id='LC90'>	<span class="p">}</span></div><div class='line' id='LC91'><br/></div><div class='line' id='LC92'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">switch_skin</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC93'>		<span class="c1">//	Since after_switch_theme won&#39;t run, let&#39;s make sure that we generate the CSS</span></div><div class='line' id='LC94'>		<span class="k">if</span> <span class="p">(</span><span class="nx">is_admin</span><span class="p">()</span> <span class="o">&amp;&amp;</span> <span class="o">!</span> <span class="nx">get_option</span><span class="p">(</span><span class="nx">__CLASS__</span> <span class="o">.</span> <span class="s1">&#39;_generate&#39;</span><span class="p">))</span> <span class="p">{</span></div><div class='line' id='LC95'>			<span class="nx">thesis_generate_css</span><span class="p">();</span></div><div class='line' id='LC96'>			<span class="nx">update_option</span><span class="p">(</span><span class="nx">__CLASS__</span> <span class="o">.</span> <span class="s1">&#39;_generate&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span></div><div class='line' id='LC97'>			<span class="nx">wp_cache_flush</span><span class="p">();</span></div><div class='line' id='LC98'>		<span class="p">}</span></div><div class='line' id='LC99'>		<span class="k">else</span> <span class="k">return</span> <span class="k">null</span><span class="p">;</span></div><div class='line' id='LC100'>	<span class="p">}</span></div><div class='line' id='LC101'><br/></div><div class='line' id='LC102'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">home</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC103'>		<span class="c1">// this is really just what thesis normally does, except we are excluding posts in &quot;uncategorized&quot;</span></div><div class='line' id='LC104'><br/></div><div class='line' id='LC105'>		<span class="nv">$post_count</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span></div><div class='line' id='LC106'>		<span class="nv">$teaser_count</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span></div><div class='line' id='LC107'><br/></div><div class='line' id='LC108'>		<span class="nv">$args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC109'>			<span class="s1">&#39;category__not_in&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="c1">// pass an array of cat ids you DON&#39;T want</span></div><div class='line' id='LC110'>		<span class="p">);</span></div><div class='line' id='LC111'>		<span class="nv">$home_query</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">WP_Query</span><span class="p">(</span><span class="nv">$args</span><span class="p">);</span> <span class="c1">// stick that in the WP_Query class</span></div><div class='line' id='LC112'><br/></div><div class='line' id='LC113'>		<span class="k">while</span> <span class="p">(</span><span class="nv">$home_query</span><span class="o">-&gt;</span><span class="na">have_posts</span><span class="p">())</span> <span class="p">{</span> <span class="c1">// I do my while loops in brackets cuz I&#39;m a rebel like that</span></div><div class='line' id='LC114'>			<span class="nv">$home_query</span><span class="o">-&gt;</span><span class="na">the_post</span><span class="p">();</span></div><div class='line' id='LC115'><br/></div><div class='line' id='LC116'>			<span class="k">if</span> <span class="p">(</span><span class="nx">apply_filters</span><span class="p">(</span><span class="s1">&#39;thesis_is_teaser&#39;</span><span class="p">,</span> <span class="nx">thesis_is_teaser</span><span class="p">(</span><span class="nv">$post_count</span><span class="p">)))</span> <span class="p">{</span></div><div class='line' id='LC117'>				<span class="k">if</span> <span class="p">((</span><span class="nv">$teaser_count</span> <span class="o">%</span> <span class="mi">2</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC118'>					<span class="nv">$top</span> <span class="o">=</span> <span class="p">(</span><span class="nv">$post_count</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="o">?</span> <span class="s1">&#39; top&#39;</span> <span class="o">:</span> <span class="s1">&#39;&#39;</span><span class="p">;</span></div><div class='line' id='LC119'>					<span class="nv">$open_box</span> <span class="o">=</span> <span class="s1">&#39;&lt;div class=&quot;teasers_box$top&quot;&gt;&#39;</span><span class="p">;</span></div><div class='line' id='LC120'>					<span class="nv">$close_box</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="p">;</span></div><div class='line' id='LC121'>					<span class="nv">$right</span> <span class="o">=</span> <span class="k">false</span><span class="p">;</span></div><div class='line' id='LC122'>				<span class="p">}</span></div><div class='line' id='LC123'>				<span class="k">else</span> <span class="p">{</span></div><div class='line' id='LC124'>					<span class="nv">$open_box</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="p">;</span></div><div class='line' id='LC125'>					<span class="nv">$close_box</span> <span class="o">=</span> <span class="s2">&quot;&lt;/div&gt;&quot;</span><span class="p">;</span></div><div class='line' id='LC126'>					<span class="nv">$right</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span></div><div class='line' id='LC127'>				<span class="p">}</span></div><div class='line' id='LC128'><br/></div><div class='line' id='LC129'>				<span class="k">if</span> <span class="p">(</span><span class="nv">$open_box</span> <span class="o">!=</span> <span class="s1">&#39;&#39;</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC130'>					<span class="k">echo</span> <span class="nv">$open_box</span><span class="p">;</span></div><div class='line' id='LC131'>					<span class="nx">thesis_hook_before_teasers_box</span><span class="p">(</span><span class="nv">$post_count</span><span class="p">);</span></div><div class='line' id='LC132'>				<span class="p">}</span></div><div class='line' id='LC133'><br/></div><div class='line' id='LC134'>				<span class="nx">thesis_teaser</span><span class="p">(</span><span class="nv">$classes</span><span class="p">,</span> <span class="nv">$post_count</span><span class="p">,</span> <span class="nv">$right</span><span class="p">);</span></div><div class='line' id='LC135'><br/></div><div class='line' id='LC136'>				<span class="k">if</span> <span class="p">(</span><span class="nv">$close_box</span> <span class="o">!=</span> <span class="s1">&#39;&#39;</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC137'>					<span class="k">echo</span> <span class="nv">$close_box</span><span class="p">;</span></div><div class='line' id='LC138'>					<span class="nx">thesis_hook_after_teasers_box</span><span class="p">(</span><span class="nv">$post_count</span><span class="p">);</span></div><div class='line' id='LC139'>				<span class="p">}</span></div><div class='line' id='LC140'><br/></div><div class='line' id='LC141'>				<span class="nv">$teaser_count</span><span class="o">++</span><span class="p">;</span></div><div class='line' id='LC142'>			<span class="p">}</span></div><div class='line' id='LC143'>			<span class="k">else</span> <span class="p">{</span></div><div class='line' id='LC144'>				<span class="nv">$classes</span> <span class="o">=</span> <span class="s1">&#39;post_box&#39;</span><span class="p">;</span></div><div class='line' id='LC145'><br/></div><div class='line' id='LC146'>				<span class="k">if</span> <span class="p">(</span><span class="nv">$post_count</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span></div><div class='line' id='LC147'>					<span class="nv">$classes</span> <span class="o">.=</span> <span class="s1">&#39; top&#39;</span><span class="p">;</span></div><div class='line' id='LC148'><br/></div><div class='line' id='LC149'>				<span class="nx">thesis_post_box</span><span class="p">(</span><span class="nv">$classes</span><span class="p">,</span> <span class="nv">$post_count</span><span class="p">);</span></div><div class='line' id='LC150'>			<span class="p">}</span></div><div class='line' id='LC151'><br/></div><div class='line' id='LC152'>			<span class="nv">$post_count</span><span class="o">++</span><span class="p">;</span></div><div class='line' id='LC153'>		<span class="p">}</span></div><div class='line' id='LC154'><br/></div><div class='line' id='LC155'>		<span class="k">if</span> <span class="p">(((</span><span class="nv">$teaser_count</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">%</span> <span class="mi">2</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span></div><div class='line' id='LC156'>			<span class="k">echo</span> <span class="s2">&quot;&lt;/div&gt;&quot;</span><span class="p">;</span></div><div class='line' id='LC157'>	<span class="p">}</span></div><div class='line' id='LC158'><span class="p">}</span></div><div class='line' id='LC159'><br/></div><div class='line' id='LC160'><span class="k">new</span> <span class="nx">thesis_skin_example</span><span class="p">;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1942457/94d923b35adf317eb03e5702ed8a47c3ae1c3381/custom_functions.php" style="float:right;" rel="nofollow">view raw</a>
            <a href="https://gist.github.com/1942457#file_custom_functions.php" style="float:right;margin-right:10px;color:#666" rel="nofollow">custom_functions.php</a>
            <a href="https://gist.github.com/1942457" rel="nofollow">This Gist</a> brought to you by <a href="http://github.com" rel="nofollow">GitHub</a>.
          </div>
        </div>
</div>
</p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/thesis-skin-starter-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thesis Child Theme Starter Template</title>
		<link>http://diythemes.com/thesis/rtfm/thesis-child-theme-starter-template/</link>
		<comments>http://diythemes.com/thesis/rtfm/thesis-child-theme-starter-template/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 17:15:55 +0000</pubDate>
		<dc:creator>mattonomics</dc:creator>
				<category><![CDATA[Advanced Customizations]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3235</guid>
		<description><![CDATA[Does Thesis support child themes? That is a question many users have. The answer is definitively &#8220;yes&#8221;. This tutorial will show you the best way to make a child theme for Thesis. We&#8217;ll start with a barebones class, then add in some flair to show you the possibilities. I think you&#8217;ll be delighted by how [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>Does Thesis support child themes? That is a question many users have. The answer is definitively &#8220;yes&#8221;.</p>
<p>This tutorial will show you the best way to make a child theme for Thesis. We&#8217;ll start with a barebones class, then add in some flair to show you the possibilities. I think you&#8217;ll be delighted by how simple making a child theme with Thesis really is.</p>
<p>If you aren&#8217;t familiar with the <a title="Thesis Custom Loop API" href="http://diythemes.com/thesis/rtfm/custom-loop-api/">Thesis Custom Loop API</a>, quickly run over it as it is the foundation for what we&#8217;ll cover here.</p>
<h2>The Basics</h2>
<p>Every child theme needs to have, at the very least, a style.css. In theory, your whole child theme could simply be that one file. The basic example includes the necessary header information and one line of CSS.</p>
<p>The functions.php file, though not required by WordPress, is where all of your Thesis child theme customizations should occur. Do not include a custom folder with child themes! Thesis custom folders belong to Thesis, not the child theme.</p>
<p>It is important to point out that WordPress treats child themes in an interesting way. The child theme&#8217;s functions.php file is actually included before the parent theme&#8217;s. That means that each Thesis child theme must first include Thesis&#8217; functions.php file in order to access the yummy Thesis goodness contained within.</p>
<p>You may also notice that we are using a class instead of a bunch of disparate functions. This is for a few reasons:</p>
<ol>
<li>To use the Custom Loop API</li>
<li>Better organization</li>
<li>Classes are how you will interact with Thesis 2.0, so you need to understand them</li>
</ol>
<p>To use the child theme:</p>
<ol>
<li>Create a folder in the themes directory</li>
<li>Create a style.css file and a functions.php file</li>
<li>Copy/paste the code below to the relevant file (or just <a title="Thesis Child Theme Basic" href="https://gist.github.com/gists/1950500/download">download the tar ball here</a>)</li>
<li>Navigate to Appearance &gt; Themes and Switch to the child theme</li>
<li>Visit your home page. The background should be black.</li>
</ol>
<p><div id="gist-1950500" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="c1">// Iinitial sanity check</span></div><div class='line' id='LC3'><span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="nb">defined</span><span class="p">(</span><span class="s1">&#39;ABSPATH&#39;</span><span class="p">))</span></div><div class='line' id='LC4'>	<span class="k">die</span><span class="p">(</span><span class="s1">&#39;Please do not directly access this file&#39;</span><span class="p">);</span></div><div class='line' id='LC5'><br/></div><div class='line' id='LC6'><span class="c1">// Bring in the main functions file so we have access to all the yummy Thesis goodness</span></div><div class='line' id='LC7'><span class="k">include_once</span><span class="p">(</span><span class="nx">TEMPLATEPATH</span> <span class="o">.</span> <span class="s1">&#39;/functions.php&#39;</span><span class="p">);</span></div><div class='line' id='LC8'><br/></div><div class='line' id='LC9'><span class="c1">// we encourage you to set up a class. classes are a VERY important part of 2.0, so you need to be familiar with them.</span></div><div class='line' id='LC10'><br/></div><div class='line' id='LC11'><span class="k">class</span> <span class="nc">thesis_child_theme_example</span> <span class="k">extends</span> <span class="nx">thesis_custom_loop</span> <span class="p">{</span></div><div class='line' id='LC12'><br/></div><div class='line' id='LC13'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">__construct</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC14'>		<span class="c1">// run the parent constructor so we can access the thesis custom loop api</span></div><div class='line' id='LC15'>		<span class="k">parent</span><span class="o">::</span><span class="na">__construct</span><span class="p">();</span></div><div class='line' id='LC16'><br/></div><div class='line' id='LC17'>		<span class="c1">// run the main init</span></div><div class='line' id='LC18'>		<span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;init&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="nv">$this</span><span class="p">,</span> <span class="s1">&#39;init&#39;</span><span class="p">));</span></div><div class='line' id='LC19'>	<span class="p">}</span></div><div class='line' id='LC20'><br/></div><div class='line' id='LC21'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">init</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC22'>		<span class="c1">// actions and filters that will run on init. you could put other things here if you need.</span></div><div class='line' id='LC23'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">actions</span><span class="p">();</span></div><div class='line' id='LC24'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">filters</span><span class="p">();</span></div><div class='line' id='LC25'>	<span class="p">}</span></div><div class='line' id='LC26'><br/></div><div class='line' id='LC27'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">actions</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC28'>		<span class="c1">// add and remove actions here</span></div><div class='line' id='LC29'><br/></div><div class='line' id='LC30'>		<span class="c1">// this will force thesis to generate CSS when the user switches to the child</span></div><div class='line' id='LC31'>		<span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;after_switch_theme&#39;</span><span class="p">,</span> <span class="s1">&#39;thesis_generate_css&#39;</span><span class="p">);</span></div><div class='line' id='LC32'>	<span class="p">}</span></div><div class='line' id='LC33'><br/></div><div class='line' id='LC34'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">filters</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC35'>		<span class="c1">// add and remove filters here</span></div><div class='line' id='LC36'>	<span class="p">}</span></div><div class='line' id='LC37'><br/></div><div class='line' id='LC38'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">home</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC39'>		<span class="nx">thesis_loop</span><span class="o">::</span><span class="na">home</span><span class="p">();</span> <span class="c1">// remove this line and enter your custom loop</span></div><div class='line' id='LC40'>	<span class="p">}</span></div><div class='line' id='LC41'><br/></div><div class='line' id='LC42'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">archive</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC43'>		<span class="nx">thesis_loop</span><span class="o">::</span><span class="na">archive</span><span class="p">();</span> <span class="c1">// remove this line and enter your custom loop</span></div><div class='line' id='LC44'>	<span class="p">}</span></div><div class='line' id='LC45'><span class="p">}</span></div><div class='line' id='LC46'><br/></div><div class='line' id='LC47'><span class="k">new</span> <span class="nx">thesis_child_theme_example</span><span class="p">;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1950500/ccc34987829f9cbc00349343a5f284a9a89ca5cb/functions.php" style="float:right;" rel="nofollow">view raw</a>
            <a href="https://gist.github.com/1950500#file_functions.php" style="float:right;margin-right:10px;color:#666" rel="nofollow">functions.php</a>
            <a href="https://gist.github.com/1950500" rel="nofollow">This Gist</a> brought to you by <a href="http://github.com" rel="nofollow">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">/*</span></div><div class='line' id='LC2'><span class="c">Theme Name:     Thesis Theme Example Child</span></div><div class='line' id='LC3'><span class="c">Theme URI:      http://diythemes.com/plans/</span></div><div class='line' id='LC4'><span class="c">Description:    Child theme for the Thesis</span></div><div class='line' id='LC5'><span class="c">Author:         DIYthemes - Matt Gross</span></div><div class='line' id='LC6'><span class="c">Author URI:     http://diythemes.com</span></div><div class='line' id='LC7'><span class="c">Template:       thesis_184</span></div><div class='line' id='LC8'><span class="c">Version:        1.0</span></div><div class='line' id='LC9'><span class="c">*/</span></div><div class='line' id='LC10'><br/></div><div class='line' id='LC11'><span class="c">/*---:[ body ]:---*/</span></div><div class='line' id='LC12'><span class="nt">body</span> <span class="p">{</span> <span class="k">background</span><span class="o">:</span> <span class="m">#000</span><span class="p">;</span> <span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1950500/463be95df1bfc2c50b2935ecd60ef35943cc59ae/style.css" style="float:right;" rel="nofollow">view raw</a>
            <a href="https://gist.github.com/1950500#file_style.css" style="float:right;margin-right:10px;color:#666" rel="nofollow">style.css</a>
            <a href="https://gist.github.com/1950500" rel="nofollow">This Gist</a> brought to you by <a href="http://github.com" rel="nofollow">GitHub</a>.
          </div>
        </div>
</div>
</p>
<h2>Advanced Customization</h2>
<p>Now that we&#8217;ve covered the basics, lets dive into some real customization. Basically, what we&#8217;re doing here is:</p>
<ul>
<li>forcing Thesis to regenerate CSS</li>
<li>exclude the Thesis style.css and include the child&#8217;s style.css</li>
<li>filter out styles related to the nav coloring, then adding our own back int</li>
<li>remove the containing div from around the nav menu</li>
</ul>
<p>Be sure to copy/paste the code below to the correct files, or you can <a title="Thesis Child Theme Advanced" href="https://gist.github.com/gists/1950695/download">download the tar ball here</a>.</p>
<p><div id="gist-1950695" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="nb">defined</span><span class="p">(</span><span class="s1">&#39;ABSPATH&#39;</span><span class="p">))</span></div><div class='line' id='LC4'>	<span class="k">die</span><span class="p">(</span><span class="s1">&#39;Please do not directly access this file&#39;</span><span class="p">);</span></div><div class='line' id='LC5'><br/></div><div class='line' id='LC6'><span class="k">include_once</span><span class="p">(</span><span class="nx">TEMPLATEPATH</span> <span class="o">.</span> <span class="s1">&#39;/functions.php&#39;</span><span class="p">);</span></div><div class='line' id='LC7'><br/></div><div class='line' id='LC8'><span class="k">class</span> <span class="nc">thesis_child_theme_example</span> <span class="k">extends</span> <span class="nx">thesis_custom_loop</span> <span class="p">{</span></div><div class='line' id='LC9'><br/></div><div class='line' id='LC10'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">__construct</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC11'>		<span class="k">parent</span><span class="o">::</span><span class="na">__construct</span><span class="p">();</span></div><div class='line' id='LC12'>		<span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;init&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="nv">$this</span><span class="p">,</span> <span class="s1">&#39;init&#39;</span><span class="p">));</span></div><div class='line' id='LC13'>	<span class="p">}</span></div><div class='line' id='LC14'><br/></div><div class='line' id='LC15'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">init</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC16'>		<span class="c1">// actions and filters that will run on init. you could put other things here if you need.</span></div><div class='line' id='LC17'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">actions</span><span class="p">();</span></div><div class='line' id='LC18'>		<span class="nv">$this</span><span class="o">-&gt;</span><span class="na">filters</span><span class="p">();</span></div><div class='line' id='LC19'>	<span class="p">}</span></div><div class='line' id='LC20'><br/></div><div class='line' id='LC21'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">actions</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC22'>		<span class="c1">// add and remove actions here</span></div><div class='line' id='LC23'><br/></div><div class='line' id='LC24'>		<span class="c1">// this will force thesis to generate CSS when the user switches to the child</span></div><div class='line' id='LC25'>		<span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;after_switch_theme&#39;</span><span class="p">,</span> <span class="s1">&#39;thesis_generate_css&#39;</span><span class="p">);</span></div><div class='line' id='LC26'><br/></div><div class='line' id='LC27'>		<span class="c1">// modify the nav menu to exclude the div wrapper that WP defaults to</span></div><div class='line' id='LC28'>		<span class="nx">remove_action</span><span class="p">(</span><span class="s1">&#39;thesis_hook_before_header&#39;</span><span class="p">,</span> <span class="s1">&#39;thesis_nav_menu&#39;</span><span class="p">);</span></div><div class='line' id='LC29'>		<span class="nx">add_action</span><span class="p">(</span><span class="s1">&#39;thesis_hook_before_header&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="nv">$this</span><span class="p">,</span> <span class="s1">&#39;nav&#39;</span><span class="p">));</span></div><div class='line' id='LC30'>	<span class="p">}</span></div><div class='line' id='LC31'><br/></div><div class='line' id='LC32'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">filters</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC33'>		<span class="c1">// add and remove filters here</span></div><div class='line' id='LC34'><br/></div><div class='line' id='LC35'>		<span class="cm">/* </span></div><div class='line' id='LC36'><span class="cm">		*	Filter out the standard thesis style.css. </span></div><div class='line' id='LC37'><span class="cm">		*	Run this with a priority of 11 if you want to make sure the gravity forms css gets added.</span></div><div class='line' id='LC38'><span class="cm">		*/</span></div><div class='line' id='LC39'>		<span class="nx">add_filter</span><span class="p">(</span><span class="s1">&#39;thesis_css&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="nv">$this</span><span class="p">,</span> <span class="s1">&#39;css&#39;</span><span class="p">),</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">5</span><span class="p">);</span></div><div class='line' id='LC40'>	<span class="p">}</span></div><div class='line' id='LC41'><br/></div><div class='line' id='LC42'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">css</span><span class="p">(</span><span class="nv">$contents</span><span class="p">,</span> <span class="nv">$thesis_css</span><span class="p">,</span> <span class="nv">$style</span><span class="p">,</span> <span class="nv">$multisite</span><span class="p">,</span> <span class="nv">$child</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC43'><br/></div><div class='line' id='LC44'>		<span class="c1">// filter the Thesis generated css. in this example we&#39;re removing all the nav styles related to color</span></div><div class='line' id='LC45'>		<span class="nv">$generated_css</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-&gt;</span><span class="na">filter_css</span><span class="p">(</span><span class="nv">$thesis_css</span><span class="o">-&gt;</span><span class="na">css</span><span class="p">);</span></div><div class='line' id='LC46'><br/></div><div class='line' id='LC47'>		<span class="cm">/* </span></div><div class='line' id='LC48'><span class="cm">		*	You can access the thesis_css object, which contains a variety of settings. </span></div><div class='line' id='LC49'><span class="cm">		*	As an example, I&#39;ll show you how to access nav text color.</span></div><div class='line' id='LC50'><span class="cm">		*	Remember that you can always do this in style.css if you don&#39;t care about users having control over the colors </span></div><div class='line' id='LC51'><span class="cm">		*/</span></div><div class='line' id='LC52'>		<span class="nv">$my_css</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="se">n</span><span class="s2">/*---:[ my nav menu styles ]:---*/</span><span class="se">n</span><span class="s2">&quot;</span> <span class="c1">// it&#39;s always a good idea to add in comments as to what you&#39;re adding</span></div><div class='line' id='LC53'>				<span class="o">.</span> <span class="s2">&quot;.menu li a { color: #</span><span class="si">{</span><span class="nv">$thesis_css</span><span class="o">-&gt;</span><span class="na">nav</span><span class="p">[</span><span class="s1">&#39;link&#39;</span><span class="p">][</span><span class="s1">&#39;color&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"> }</span><span class="se">n</span><span class="s2">&quot;</span></div><div class='line' id='LC54'>				<span class="o">.</span> <span class="s2">&quot;.menu li a:hover { color: #</span><span class="si">{</span><span class="nv">$thesis_css</span><span class="o">-&gt;</span><span class="na">nav</span><span class="p">[</span><span class="s1">&#39;link&#39;</span><span class="p">][</span><span class="s1">&#39;hover&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2"> }</span><span class="se">nn</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC55'><br/></div><div class='line' id='LC56'>		<span class="c1">// put in everything except the main thesis style.css. also add an initial css reset</span></div><div class='line' id='LC57'>		<span class="nv">$css</span> <span class="o">=</span> <span class="nv">$thesis_css</span><span class="o">-&gt;</span><span class="na">fonts_to_import</span> <span class="o">.</span> <span class="nv">$this</span><span class="o">-&gt;</span><span class="na">css_reset</span> <span class="o">.</span> <span class="nv">$generated_css</span> <span class="o">.</span> <span class="nv">$my_css</span> <span class="o">.</span> <span class="nv">$child</span><span class="p">;</span></div><div class='line' id='LC58'><br/></div><div class='line' id='LC59'>		<span class="c1">// return it</span></div><div class='line' id='LC60'>		<span class="k">return</span> <span class="nv">$css</span><span class="p">;</span></div><div class='line' id='LC61'>	<span class="p">}</span></div><div class='line' id='LC62'><br/></div><div class='line' id='LC63'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">filter_css</span><span class="p">(</span><span class="nv">$css</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC64'>		<span class="k">if</span> <span class="p">(</span><span class="o">!</span> <span class="k">empty</span><span class="p">(</span><span class="nv">$css</span><span class="p">))</span> <span class="p">{</span></div><div class='line' id='LC65'><br/></div><div class='line' id='LC66'>			<span class="c1">// remove the nav colors</span></div><div class='line' id='LC67'>			<span class="k">if</span> <span class="p">(</span><span class="nb">preg_match</span><span class="p">(</span><span class="s1">&#39;|/*---:[ nav colors ]:---*/(n.+){7}|i&#39;</span><span class="p">,</span> <span class="nv">$css</span><span class="p">))</span></div><div class='line' id='LC68'>				<span class="nv">$css</span> <span class="o">=</span> <span class="nb">preg_replace</span><span class="p">(</span><span class="s1">&#39;|/*---:[ nav colors ]:---*/(n.+){7}|i&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="nv">$css</span><span class="p">);</span></div><div class='line' id='LC69'><br/></div><div class='line' id='LC70'>			<span class="c1">// you could add more filtering here</span></div><div class='line' id='LC71'>		<span class="p">}</span>		</div><div class='line' id='LC72'>		<span class="k">return</span> <span class="nv">$css</span><span class="p">;</span></div><div class='line' id='LC73'>	<span class="p">}</span></div><div class='line' id='LC74'><br/></div><div class='line' id='LC75'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">nav</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC76'>		<span class="k">global</span> <span class="nv">$thesis_site</span><span class="p">;</span></div><div class='line' id='LC77'>		<span class="k">if</span> <span class="p">(</span><span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;wp_nav_menu&#39;</span><span class="p">)</span> <span class="o">&amp;&amp;</span> <span class="nv">$thesis_site</span><span class="o">-&gt;</span><span class="na">nav</span><span class="p">[</span><span class="s1">&#39;type&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;wp&#39;</span><span class="p">)</span> <span class="p">{</span> <span class="c1">#wp</span></div><div class='line' id='LC78'>			<span class="nv">$args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC79'>				<span class="s1">&#39;theme_location&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;primary&#39;</span><span class="p">,</span></div><div class='line' id='LC80'>				<span class="s1">&#39;container&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;&#39;</span><span class="p">,</span></div><div class='line' id='LC81'>				<span class="s1">&#39;fallback_cb&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;thesis_nav_default&#39;</span></div><div class='line' id='LC82'>			<span class="p">);</span></div><div class='line' id='LC83'>			<span class="nx">wp_nav_menu</span><span class="p">(</span><span class="nv">$args</span><span class="p">);</span> <span class="c1">#wp</span></div><div class='line' id='LC84'>			<span class="k">echo</span> <span class="s2">&quot;</span><span class="se">n</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC85'>		<span class="p">}</span></div><div class='line' id='LC86'>		<span class="k">else</span></div><div class='line' id='LC87'>			<span class="nx">thesis_nav_default</span><span class="p">();</span></div><div class='line' id='LC88'>	<span class="p">}</span></div><div class='line' id='LC89'><br/></div><div class='line' id='LC90'>	<span class="k">public</span> <span class="k">function</span> <span class="nf">home</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC91'>		<span class="nv">$post_count</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span></div><div class='line' id='LC92'>		<span class="nv">$teaser_count</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span></div><div class='line' id='LC93'><br/></div><div class='line' id='LC94'>		<span class="nv">$args</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC95'>			<span class="s1">&#39;category__not_in&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span></div><div class='line' id='LC96'>		<span class="p">);</span></div><div class='line' id='LC97'><br/></div><div class='line' id='LC98'>		<span class="nv">$home_query</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">WP_Query</span><span class="p">(</span><span class="nv">$args</span><span class="p">);</span></div><div class='line' id='LC99'><br/></div><div class='line' id='LC100'>		<span class="k">while</span> <span class="p">(</span><span class="nv">$home_query</span><span class="o">-&gt;</span><span class="na">have_posts</span><span class="p">())</span> <span class="p">{</span></div><div class='line' id='LC101'>			<span class="nv">$home_query</span><span class="o">-&gt;</span><span class="na">the_post</span><span class="p">();</span></div><div class='line' id='LC102'><br/></div><div class='line' id='LC103'>			<span class="k">if</span> <span class="p">(</span><span class="nx">apply_filters</span><span class="p">(</span><span class="s1">&#39;thesis_is_teaser&#39;</span><span class="p">,</span> <span class="nx">thesis_is_teaser</span><span class="p">(</span><span class="nv">$post_count</span><span class="p">)))</span> <span class="p">{</span></div><div class='line' id='LC104'>				<span class="k">if</span> <span class="p">((</span><span class="nv">$teaser_count</span> <span class="o">%</span> <span class="mi">2</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC105'>					<span class="nv">$top</span> <span class="o">=</span> <span class="p">(</span><span class="nv">$post_count</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="o">?</span> <span class="s1">&#39; top&#39;</span> <span class="o">:</span> <span class="s1">&#39;&#39;</span><span class="p">;</span></div><div class='line' id='LC106'>					<span class="nv">$open_box</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="se">ttt</span><span class="s2">&lt;div class=</span><span class="se">&quot;</span><span class="s2">teasers_box</span><span class="si">$top</span><span class="se">&quot;</span><span class="s2">&gt;</span><span class="se">nn</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC107'>					<span class="nv">$close_box</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="p">;</span></div><div class='line' id='LC108'>					<span class="nv">$right</span> <span class="o">=</span> <span class="k">false</span><span class="p">;</span></div><div class='line' id='LC109'>				<span class="p">}</span></div><div class='line' id='LC110'>				<span class="k">else</span> <span class="p">{</span></div><div class='line' id='LC111'>					<span class="nv">$open_box</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="p">;</span></div><div class='line' id='LC112'>					<span class="nv">$close_box</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="se">ttt</span><span class="s2">&lt;/div&gt;</span><span class="se">nn</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC113'>					<span class="nv">$right</span> <span class="o">=</span> <span class="k">true</span><span class="p">;</span></div><div class='line' id='LC114'>				<span class="p">}</span></div><div class='line' id='LC115'><br/></div><div class='line' id='LC116'>				<span class="k">if</span> <span class="p">(</span><span class="nv">$open_box</span> <span class="o">!=</span> <span class="s1">&#39;&#39;</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC117'>					<span class="k">echo</span> <span class="nv">$open_box</span><span class="p">;</span></div><div class='line' id='LC118'>					<span class="nx">thesis_hook_before_teasers_box</span><span class="p">(</span><span class="nv">$post_count</span><span class="p">);</span></div><div class='line' id='LC119'>				<span class="p">}</span></div><div class='line' id='LC120'><br/></div><div class='line' id='LC121'>				<span class="nx">thesis_teaser</span><span class="p">(</span><span class="nv">$classes</span><span class="p">,</span> <span class="nv">$post_count</span><span class="p">,</span> <span class="nv">$right</span><span class="p">);</span></div><div class='line' id='LC122'><br/></div><div class='line' id='LC123'>				<span class="k">if</span> <span class="p">(</span><span class="nv">$close_box</span> <span class="o">!=</span> <span class="s1">&#39;&#39;</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC124'>					<span class="k">echo</span> <span class="nv">$close_box</span><span class="p">;</span></div><div class='line' id='LC125'>					<span class="nx">thesis_hook_after_teasers_box</span><span class="p">(</span><span class="nv">$post_count</span><span class="p">);</span></div><div class='line' id='LC126'>				<span class="p">}</span></div><div class='line' id='LC127'><br/></div><div class='line' id='LC128'>				<span class="nv">$teaser_count</span><span class="o">++</span><span class="p">;</span></div><div class='line' id='LC129'>			<span class="p">}</span></div><div class='line' id='LC130'>			<span class="k">else</span> <span class="p">{</span></div><div class='line' id='LC131'>				<span class="nv">$classes</span> <span class="o">=</span> <span class="s1">&#39;post_box&#39;</span><span class="p">;</span></div><div class='line' id='LC132'><br/></div><div class='line' id='LC133'>				<span class="k">if</span> <span class="p">(</span><span class="nv">$post_count</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span></div><div class='line' id='LC134'>					<span class="nv">$classes</span> <span class="o">.=</span> <span class="s1">&#39; top&#39;</span><span class="p">;</span></div><div class='line' id='LC135'><br/></div><div class='line' id='LC136'>				<span class="nx">thesis_post_box</span><span class="p">(</span><span class="nv">$classes</span><span class="p">,</span> <span class="nv">$post_count</span><span class="p">);</span></div><div class='line' id='LC137'>			<span class="p">}</span></div><div class='line' id='LC138'><br/></div><div class='line' id='LC139'>			<span class="nv">$post_count</span><span class="o">++</span><span class="p">;</span></div><div class='line' id='LC140'>		<span class="p">}</span></div><div class='line' id='LC141'><br/></div><div class='line' id='LC142'>		<span class="k">if</span> <span class="p">(((</span><span class="nv">$teaser_count</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> <span class="o">%</span> <span class="mi">2</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span></div><div class='line' id='LC143'>			<span class="k">echo</span> <span class="s2">&quot;</span><span class="se">ttt</span><span class="s2">&lt;/div&gt;</span><span class="se">nn</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC144'>	<span class="p">}</span></div><div class='line' id='LC145'><span class="p">}</span></div><div class='line' id='LC146'><br/></div><div class='line' id='LC147'><span class="k">new</span> <span class="nx">thesis_child_theme_example</span><span class="p">;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1950695/767495b5164eb6ffcf8c113228f68bb95c8ed680/functions.php" style="float:right;" rel="nofollow">view raw</a>
            <a href="https://gist.github.com/1950695#file_functions.php" style="float:right;margin-right:10px;color:#666" rel="nofollow">functions.php</a>
            <a href="https://gist.github.com/1950695" rel="nofollow">This Gist</a> brought to you by <a href="http://github.com" rel="nofollow">GitHub</a>.
          </div>
        </div>

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c">/*</span></div><div class='line' id='LC2'><span class="c">Theme Name:     Thesis Theme Example Child</span></div><div class='line' id='LC3'><span class="c">Theme URI:      http://diythemes.com/plans/</span></div><div class='line' id='LC4'><span class="c">Description:    Child theme for the Thesis</span></div><div class='line' id='LC5'><span class="c">Author:         DIYthemes - Matt Gross</span></div><div class='line' id='LC6'><span class="c">Author URI:     http://diythemes.com</span></div><div class='line' id='LC7'><span class="c">Template:       thesis_184</span></div><div class='line' id='LC8'><span class="c">Version:        1.0</span></div><div class='line' id='LC9'><span class="c">*/</span></div><div class='line' id='LC10'><br/></div><div class='line' id='LC11'><span class="c">/*---:[ body ]:---*/</span></div><div class='line' id='LC12'><span class="nt">body</span> <span class="p">{</span> <span class="k">background</span><span class="o">:</span> <span class="m">#000</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC13'><br/></div><div class='line' id='LC14'><span class="c">/*---:[ menu ]:---*/</span></div><div class='line' id='LC15'><span class="nc">.menu</span> <span class="p">{</span> <span class="k">list-style</span><span class="o">:</span> <span class="k">none</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC16'>	<span class="nc">.menu</span> <span class="nt">li</span> <span class="p">{</span> <span class="k">float</span><span class="o">:</span> <span class="k">left</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC17'>		<span class="nc">.menu</span> <span class="nt">li</span> <span class="nt">a</span> <span class="p">{</span> <span class="k">text-decoration</span><span class="o">:</span> <span class="k">none</span><span class="p">;</span> <span class="k">display</span><span class="o">:</span> <span class="k">block</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC18'><br/></div><div class='line' id='LC19'><span class="c">/*---:[ post image fix from @kristarella ]:---*/</span></div><div class='line' id='LC20'><span class="nc">.post_image</span> <span class="p">{</span> <span class="k">max-width</span><span class="o">:</span> <span class="m">100</span><span class="o">%</span><span class="p">;</span> <span class="k">height</span><span class="o">:</span> <span class="k">auto</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC21'><br/></div><div class='line' id='LC22'><span class="c">/*---:[ widget lists ]:---*/</span></div><div class='line' id='LC23'><span class="nc">.sidebar_list</span> <span class="p">{</span> <span class="k">list-style</span><span class="o">:</span> <span class="k">none</span><span class="p">;</span> <span class="p">}</span></div><div class='line' id='LC24'><br/></div><div class='line' id='LC25'><span class="c">/*---:[ clearfixes ]---*/</span></div><div class='line' id='LC26'><span class="nf">#content_box</span><span class="nd">:after</span><span class="o">,</span> <span class="nc">.menu</span><span class="nd">:after</span> <span class="p">{</span> <span class="k">visibility</span><span class="o">:</span> <span class="k">hidden</span><span class="p">;</span> <span class="k">display</span><span class="o">:</span> <span class="k">block</span><span class="p">;</span> <span class="k">content</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">;</span> <span class="k">clear</span><span class="o">:</span> <span class="k">both</span><span class="p">;</span> <span class="k">height</span><span class="o">:</span> <span class="m">0</span><span class="p">;</span> <span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1950695/aad77faa06d6ce3a2ce69c9e290f4c85f68b00fd/style.css" style="float:right;" rel="nofollow">view raw</a>
            <a href="https://gist.github.com/1950695#file_style.css" style="float:right;margin-right:10px;color:#666" rel="nofollow">style.css</a>
            <a href="https://gist.github.com/1950695" rel="nofollow">This Gist</a> brought to you by <a href="http://github.com" rel="nofollow">GitHub</a>.
          </div>
        </div>
</div>
</p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/thesis-child-theme-starter-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the Thesis Search Widget</title>
		<link>http://diythemes.com/thesis/rtfm/thesis-search-widget/</link>
		<comments>http://diythemes.com/thesis/rtfm/thesis-search-widget/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 23:15:11 +0000</pubDate>
		<dc:creator>Shelley</dc:creator>
				<category><![CDATA[Sidebars]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3215</guid>
		<description><![CDATA[This page needs further editing.]]></description>
			<content:encoded><![CDATA[</p>
<p><div id="attachment_3216" class="wp-caption aligncenter" style="width: 273px">
	<a href="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/thesis_search_widget.jpg"><img src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/thesis_search_widget.jpg" alt="Thesis Search Widget" title="Thesis Search Widget" width="273" height="314" class="size-full wp-image-3216" /></a>
	<p class="wp-caption-text">Thesis Search Widget</p>
</div></p>
<p><em>This page needs further editing.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/thesis-search-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Crop, Rotate and Flip Images with the WordPress Media Editor</title>
		<link>http://diythemes.com/thesis/rtfm/using-wordpress-image-editor/</link>
		<comments>http://diythemes.com/thesis/rtfm/using-wordpress-image-editor/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 09:33:10 +0000</pubDate>
		<dc:creator>godhammer</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3177</guid>
		<description><![CDATA[WordPress 3.1.3 provides an image editor in your WP administration dashboard. Great &#8212; but say you&#8217;re looking at a photograph you took over the weekend.  How to go from a large, unedited image located on your computer to a cropped, resized, and &#8212; there if you need it &#8212; flipped or rotated final image to [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>WordPress 3.1.3 provides an image editor in your WP administration dashboard.</p>
<p>Great &#8212; but say you&#8217;re looking at a photograph you took over the weekend.  How to go from a large, unedited image located on your computer to a cropped, resized, and &#8212; there if you need it &#8212; flipped or rotated final image to use in your pages and posts?</p>
<p>The &#8220;how to&#8221; of WordPress image editing is the focus of this tutorial.</p>
<p>First, the image on your computer needs to be available as an image on your remote host server.  In other words, WordPress needs server-side access to the image so it can make and save changes.</p>
<p>Uploading an image &#8212; or images &#8212; is easier than ever in recent versions of WordPress.</p>
<p>Presuming you are logged into WordPress, navigate to: <code>Media &gt; Add New</code>.</p>
<p>You should see a screen like this one:</p>
<p><img class="aligncenter size-full wp-image-3181" title="WordPress New Media Image Uploader" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-new-media-upload-1.png" alt="WordPress New Media Image Uploader" width="597" height="443" /></p>
<p>Uploading new media &#8212; for this guide, an image &#8212; can be done in various ways.</p>
<p>If you know your image is larger than 2MB, or if a set of images, combined, will exceed the maximum filesize allowed, you&#8217;ll need to use an alternative to the &#8220;Drop File Here&#8221; drag-and-drop method.</p>
<p>We&#8217;ll assume your original image is under 2MB, which means you can simply drag the image from your desktop directly into the dotted-border area of the WordPress Media Uploader.</p>
<p>Large uploads may take a while to reach the server, but there&#8217;s a progress indicator to keep you informed as to your image&#8217;s progress.</p>
<p>Once your image is uploaded, you&#8217;ll see a screen like this in WordPress:</p>
<p><img class="aligncenter size-full wp-image-3182" title="WP Media Upload - Image Editing Interface - Overview" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-new-media-upload-2.png" alt="WP Media Upload - Image Editing Interface - Overview" width="516" height="555" /></p>
<p>Because the focus of this entry is on using the WP image editing controls, we&#8217;ll gloss over &#8212; arrows 1 and 2 &#8212; adding a title, alt text, description, and captions.</p>
<p>Add these as desired and save them &#8212; for our purposes, we&#8217;ll eventually click &#8220;Edit Image&#8221; as marked by arrow 3 above.</p>
<p>Clicking the &#8220;Edit Image&#8221; button produces an overlay screen; this is the heart of the WordPress image editing software.</p>
<p>With an image uploaded, your WP image editor interface will look like this initially:</p>
<p><img class="aligncenter size-full wp-image-3184" title="Initial WP Image Editor Screen Details" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-media-editor-first-look.png" alt="Initial WP Image Editor Screen Details" width="598" height="481" /></p>
<p>There are four primary actions near the top &#8212; crop, rotate left or right, flip (mirror), and the ever-important undo/redo pair of commands.</p>
<p>To the right are commands related to scaling, aspect ratios, and application of the edits you make &#8212; effectively, these options dictate whether your editing applies to the thumbnail version of your image, the non-thumbnail version(s) of your image, or to <em>all</em> versions of the image.</p>
<p>Note that in this context, the &#8220;thumbnail&#8221; is the WordPress thumbnail, which is not the same as the thumbnail images used (default) by Thesis.</p>
<h3>Image Editing in WordPress &#8212; Selecting &amp; Cropping</h3>
<p>Making a &#8220;selection&#8221; &#8212; a rectangular area on the image that is smaller than the full image &#8212; is a common way to adjust the aspect ratio (skyscraper, square, wide rectangle) by eye.</p>
<p>In most cases, once you&#8217;ve made a selection, the next step is to crop to the selection, reducing both the image size in pixels and kilobytes.</p>
<p>A left-click with your input device, followed by a &#8220;dragging&#8221; movement while holding down the left-click button or equivalent, will result in a rectangle of the size and shape that is determined by when and where you release of the input button.</p>
<p>Once you&#8217;ve made a rectangle, your image will have a selected area such as this:</p>
<p><img class="aligncenter size-full wp-image-3185" title="WordPress Image Editor Selection Tool Example" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-media-editor-mouse-selection.png" alt="WordPress Image Editor Selection Tool Example" width="598" height="481" /></p>
<p>Because the original image of this tutorial&#8217;s example is quite large at 3456px wide, the selection &#8212; while only about half the size of the visible area &#8212; remains fairly large.</p>
<p>The value of the selection in pixels (1693 x 1140) can be seen at right &#8212; this is the &#8220;Selection&#8221; value pair.</p>
<p>While some WordPress site owners may wish to have large images for use in a lightbox, attachment gallery pop-ups, infographics, or other specialized purposes, for the most part, if you&#8217;re using an image in the context of a typical &#8220;content column&#8221; post or page, then 800px or less would be a typical width.</p>
<p>For comparative purposes, this tutorial&#8217;s content column is 616 pixels wide.  Our image selection is therefore currently almost three times larger than we&#8217;d need it to be if this image were intended for use in this User Guide content column.</p>
<p>Because the size of desired image is often less than that of the original image size, cropping is a common &#8220;next step&#8221; once a selection has been made.</p>
<p>In our example, the vantage from which the image was captured moves downhill and to the left, and contains a large grassy foreground and a walking path &#8212; we&#8217;ll say goodbye to that.</p>
<p>The selection rectangle, once it is visible as in the above screen capture, can be dragged and manipulated.</p>
<p>As a result, being &#8220;off&#8221; by a few pixels when you release the mouse is no problem.  Simply grab the brighter-toned selection rectangle, and drag it around to move it into a desired position on your original image.</p>
<p>Among the icons along the top of the WordPress image editing panel, the &#8220;crop&#8221; icon is the first.</p>
<p>With our image reduced to a selection of 1693:1140, clicking the &#8220;crop&#8221; icon results in the same WordPress tools and image editing appearance we had initially, but our image has been trimmed to size by the cropping action.</p>
<p>Not shown as an image in this tutorial is an &#8220;are you sure?&#8221; save or cancel step.  Saving your edited image brings (you) the WordPress user back to the &#8220;Upload New Media&#8221; screen.  There, you can again click &#8220;Edit Image&#8221; to continue image modification.</p>
<p>Clicking &#8220;Edit Image&#8221; after our cropping action, we now see this:</p>
<p><img class="aligncenter size-full wp-image-3186" title="WP Image Editing - Cropping an Image to Selection" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-media-editor-cropped-image.png" alt="WP Image Editing - Cropping an Image to Selection" width="598" height="407" /></p>
<p>What was previously our selection is now the whole image.  If the Save/Cancel step wasn&#8217;t a deterrent to an image accident, there&#8217;s a link (arrow above) to restore the original image.</p>
<h3>Image Editing in WordPress &#8212; Aspect Ratios</h3>
<p>Every image has an aspect ratio.</p>
<p>All an aspect ratio really is, in WordPress, graphics programs &#8212; even on your television &#8212; is the image width divided by the image height.</p>
<p>The aspect ratio tool within the WordPress Image Editor is useful in quickly adjusting your image to optimize your use of whitespace, and helps calculate a natural feel for text-wrapping interactions of the image, as well as other spatial concepts of this kind.</p>
<p>Sound hard?</p>
<p>Let&#8217;s do some math to prove it&#8217;s okay.</p>
<p>A square is the same on all sides, so pretending we have a square that is 500&#215;500 pixels, the aspect of the square is 1:1 &#8212; wonderful, simple baby math, not some horrible flashback to cramming for trig finals.</p>
<p>Common &#8220;wide not tall&#8221; rectangles might be a 2:1 or 3:1 aspect ratio.  Many &#8220;widescreen&#8221; televisions and computer monitors are 4:3 or 8:5 aspect ratio, for example.</p>
<p>Rotate the &#8220;widescreen&#8221; rectangle on its side, and you have a &#8220;skyscraper&#8221; image &#8212; an image taller than it is wide &#8212; where common aspect ratios for &#8220;tall&#8221; images are 1:4, 1:3, 1:2 &#8212; etc.</p>
<p>The point in discussing aspect ratios abstractly is that you may discover you like a handful of specific ones for use in your posts.</p>
<p>As a Thesis user, let&#8217;s say you like your &#8220;post images&#8221; at an aspect ratio of 5:1, every time, where an example would be 500px wide by 100px high.</p>
<p>But in your post <em>content</em>, left- or right-aligned images look better to you as either squares (1:1) or mini-skyscrapers (1:2) most of the time.</p>
<p>Your preferred ratios may come from experience, examining the relational widths of your columns, the size and face of your font, various margin and padding settings, split-testing results, focus groups &#8212; or maybe <em>you just like it that way, back off already</em>!</p>
<p>Whatever your reasons for aspect ratio preferences, The WordPress image editor takes the annoyance of &#8220;I think it looks okay&#8221; aspect ratio guesswork on an image-by-image basis, making it very easy to get the precise ratio you want for your images time after time.</p>
<p>We&#8217;ve already cropped our image once &#8220;by eye&#8221; to remove unwanted portions of the image.</p>
<p>By selecting some or all of the remaining image &#8212; effectively preparing another cropping action &#8212; and then typing &#8220;2&#8243; and &#8220;1&#8243; into the right-side &#8220;Aspect Ratio&#8221; area, as seen below, the WP image editor works its instant image magic:</p>
<p><img class="aligncenter size-full wp-image-3187" title="How to Use the Aspect Ratio Section of the Image Editing Tools" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-media-editor-aspect-ratio.png" alt="How to Use the Aspect Ratio Section of the Image Editing Tools" width="598" height="407" /></p>
<p>No guessing.  No finger-counting math.</p>
<p>You&#8217;ve got an aspect of 2:1 (easily changed if desired) &#8212; and you can drag that aspect ratio &#8220;box&#8221; around on your image to decide the best area for the image crop.</p>
<p>The values in pixels of your &#8220;Selection&#8221; will also appear once you&#8217;ve made a selection and establish a desired aspect ratio &#8212; remember, it&#8217;s important to keep your image wide enough in pixels to fill the ultimate destination.</p>
<p>In the screen capture below, the selection area is 114 pixels wide by 457 pixels tall &#8212; a &#8220;skyscraper&#8221; with an aspect ratio of 1:4.</p>
<p>This is wide enough to work within the content of a post, provided there&#8217;s enough text to wrap around and exceed the height of this fairly &#8220;tall&#8221; image.</p>
<p><img class="aligncenter size-full wp-image-3188" title="Image Editing - numerical pixel values corresponding to aspect ratios" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-media-editor-aspect-ratio-numbers.png" alt="Image Editing - numerical pixel values corresponding to aspect ratios" width="598" height="407" /></p>
<p>Using an aspect ratio to get close to the desired width-height relationship for your image, you can then dial-in your exact values with the &#8220;Selection&#8221; numbers if needed.</p>
<p>For example, say you want an image that is exactly 100 pixels wide.</p>
<p>By choosing the aspect ratio of 1:4 and going from our original &#8220;mouse dragging&#8221; selection, our image is now 114 x 457 px &#8212; however, you can change the &#8220;Selection&#8221; number to &#8220;100&#8243; instead of &#8220;114&#8243; &#8212; and then simply save the changes.</p>
<p>The aspect ratio will <em>not</em> dynamically reflect a manual adjustment of the &#8220;Selection&#8221; height or width, and vice-versa.</p>
<p>In other words, if you set a 1:4 aspect ratio, then change the image &#8220;Selection&#8221; width value from 114px to 100px, the aspect ratio will not reflect this change.  But here&#8217;s a tip &#8212; if you move the &#8220;selection area&#8221; slightly, these fields will update!</p>
<p>As with cropping, if you&#8217;re done choosing an aspect ratio and/or entering a custom &#8220;selection&#8221; value, save your image.</p>
<p>While Thesis thumbnails are not equivalent to the &#8220;thumbnail settings&#8221; in the WordPress Image Editing panel, if you use WP thumbnails through plugins or custom code, ensure that your actions do not fall short of the minimum desired thumbnail dimensions while cropping images to a selected area.</p>
<h3>Image Editing in WordPress &#8212; Rotation &amp; Flips</h3>
<p>For various reasons, some features of the WordPress Image Editor may not be available on all servers and hosts.  In creating this User Guide entry, rotation was not an available action.  Apparently the function <code>imagerotate()</code> was on unscheduled vacation.</p>
<p>Assuming these functions all work on <em>your</em> host, knowing the difference between rotation and flips, in the context of image editing, is probably self-explanatory, but as it&#8217;s important to know, let&#8217;s take a deeper look.</p>
<p>Each of these four icons represents a calculation of a line turned around an axis.</p>
<p><img class="aligncenter size-full wp-image-3189" title="Four icons of note from the WP Image Editing Panel" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-image-editor-rotate-or-flip.png" alt="Four icons of note from the WP Image Editing Panel" width="291" height="40" /></p>
<p>That sounds much harder than it truly is; let&#8217;s talk through the basic idea.</p>
<p>The axis for image <em>rotation</em> is a point in the center of the image &#8212; as a thought exercise, imagine jabbing a sharp pencil into the center of a sheet of (physical) paper.  You could then rotate that piece of paper like a wheel around the pencil&#8217;s point.</p>
<p><em>Flipping</em>, on the other hand, uses an invisible line &#8212; this is the axis &#8212; directly through the center of the image.  It then &#8220;flips&#8221; a reflection along that axis (a flip can also be called a &#8220;fold-down&#8221; or a <em>mirror</em> action).</p>
<p><strong>Rotation</strong>, which is simplified in the WP image editor compared to most offline image editors, is limited to adjustments of 90 degrees &#8212; right angles.  Rotations can be made to the left or the right, i.e. clockwise or counter-clockwise.</p>
<p>A common use of rotation would be to change a photograph of a person &#8220;lying on its side&#8221; (landscape) to be oriented as a &#8220;right side up&#8221; (portrait) image.</p>
<p><strong>Horizontal Flip</strong> is a reflection of your image along an invisible, <em>vertical</em> axis or line in the center of the image.</p>
<p>If you begin with an image of an arrow pointing right, then applying a horizontal flip will make the arrow point left.</p>
<p><strong>Vertical Flip</strong> is a reflection of your image along an invisible, <em>horizontal</em> axis or line in the center of the image.</p>
<p>If you have an image of an arrow that&#8217;s pointing up, applying a vertical flip will make the arrow in your image image point down.</p>
<p>When and why would you flip an image?</p>
<p>Taking the same mountainside image we&#8217;ve used throughout, and presuming a reversion (Undo action) such that we start from this:</p>
<p><img class="aligncenter size-full wp-image-3190" title="WP image editing view prior to a flipping reflection filter action" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-image-editor-before-flip.png" alt="WP image editing view prior to a flipping reflection filter action" width="400" height="315" /></p>
<p>Notice that the slope of this image runs downhill from the right to the left.</p>
<p>The human eye follows image contours of this kind, often subconsciously.</p>
<p>If this image were placed in the content of a post &#8212; and if you want your visitor&#8217;s eyes to track down and to the <em>right</em> &#8212; then as the image stands now, your visitors scanning from top to bottom will &#8220;run their eyes right off the page&#8221; thanks to this image.</p>
<p>Do images make a difference in conversions and user behavior?  Science says yes.</p>
<p>While your visitors will quickly adjust and recover from &#8220;off-roading&#8221; of this sort, once back on course, the visitors&#8217; eye is less likely to swing to your <em>intended actions</em>.</p>
<p>So in our example, had the image been &#8220;pointing&#8221; to another on-page section &#8212; a call to action, a button, a link, etc &#8212; conversions would rise slightly if the image were flipped.</p>
<p>Using one of the functions examined above &#8212; a horizontal &#8220;flip&#8221; &#8212; corrects the direction of the eye-tracking.</p>
<p><img class="aligncenter size-full wp-image-3191" title="After Horizontal Mirror Flip - WP edited Image" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/02/sample-wp-image-editor-after-flip.png" alt="After Horizontal Mirror Flip - WP edited Image" width="400" height="315" /></p>
<p>While you can select a section of the image, flipping is an &#8220;all or nothing&#8221; action &#8212; the whole image is reflected, regardless of your selected area.</p>
<p>Assuming that everything else is as you want it, your image has now been cropped, cropped again to an aspect ratio that will be harmonious within the greater context of your site, flipped to &#8220;point&#8221; the user&#8217;s eye in subtle ways to content or actions of your choosing, and you&#8217;re ready to insert the image into your posts or pages.</p>
<p>While the WordPress Image Editor is not equal to programs such as Adobe PhotoShop, it provides a clean, simple interface to perform the basic actions most commonly needed to work with WordPress images.</p>
<p>Enjoy taking the WP image editor for a spin!</p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/using-wordpress-image-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Pinterest to WordPress</title>
		<link>http://diythemes.com/thesis/rtfm/add-pinterest-pins-wordpress/</link>
		<comments>http://diythemes.com/thesis/rtfm/add-pinterest-pins-wordpress/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 10:29:30 +0000</pubDate>
		<dc:creator>godhammer</dc:creator>
				<category><![CDATA[Social Media]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3129</guid>
		<description><![CDATA[Pinterest is a fun, image-based social network that currently boasts an astronomical growth curve, long user sessions, and presents a demographic skewed female that runs through higher age brackets than most new sharing platforms. As you might guess, interacting with Pinterest users &#8212; and learning a little Pinterest lingo&#8230; pins, re-pins, boards, followers &#8212; will [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>Pinterest is a fun, image-based social network that currently boasts an astronomical growth curve, long user sessions, and presents a demographic skewed female that runs through higher age brackets than most new sharing platforms.</p>
<p>As you might guess, interacting with Pinterest users &#8212; and learning a little Pinterest lingo&#8230; pins, re-pins, boards, followers &#8212; will expand your reach and influence.</p>
<p>In short, engaging with Pinterest, effectively, can put a &#8220;pin&#8221; right through the seat of your site&#8217;s traffic!</p>
<p>Here&#8217;s an example of a Thesis site with a Pinterest &#8220;Pin It&#8221; icon waiting to be clicked:</p>
<p><img class="aligncenter size-full wp-image-3130" title="Pinterest Pin It Button in a WordPress Post - Thesis" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-feature-post-pinterest-pin-counter-one.png" alt="Pinterest Pin It Button in a WordPress Post - Thesis" width="641" height="350" /></p>
<p>But&#8230; how to go from knowing you <em>need</em> a Pinterest presence to making your site the darling of Pinterest user boards?</p>
<p>First, you&#8217;ll have to get yourself out there in order for Pinterest users to pin you down.</p>
<p>Yes, we went there.  <em>Pin</em> you down.  Groan!  Won&#8217;t happen again, Plinky promise.  Oops.  Okay, <em>now</em> it won&#8217;t.</p>
<p>As with most social networks, Pinterest offers a button-based share feature for site owners.  These should look familiar in a generic way:</p>
<p><img class="aligncenter size-full wp-image-3144" title="Three Available Styles of Pinterest Pin It Sharing Icons" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-pinterest-pin-styles.png" alt="Three Available Styles of Pinterest Pin It Sharing Icons" width="249" height="61" /></p>
<p>The call to &#8220;Pin it!&#8221; involves buttons and counters (intentionally) similar to ones you&#8217;ve seen for Facebook, Twitter, Google Plus, and so on.</p>
<p>However, while other social sharing revolves around distributing the text-based content of your site, Pinterest focuses on <em>images</em>.</p>
<p>When Pinterest users &#8220;pin&#8221; an image, source attribution is automatically added as a link to your site, similar to many text-based sharing methods.</p>
<p>And, as with Twitter <em>retweets</em>, your images can also get <em>re-pinned</em> to different &#8220;boards&#8221; &#8212; as many times as the millions of Pinterest users decide to grab a given image for their own collections.</p>
<h3>Pin-Up Your Pinterest Buttons!</h3>
<p>Clearly, providing one-click simplicity in the form of a button that gives Pinterest users the ability to &#8220;pin&#8221; your images is critical.</p>
<p>To capitalize on this opportunity, all <em>you</em> need to do is paste a code snippet to facilitate the viral sharing Pinterest naturally encourages.</p>
<p>For this Pinterest tutorial, we&#8217;ll use Thesis &#8220;post images&#8221; as our &#8220;Pin&#8221; target.</p>
<p>In other words, your post image will appear when Pinterest users click the &#8220;Pin It&#8221; button that we&#8217;ll be adding to your site.</p>
<h3>Add a Pinterest Button to Thesis &#8220;Feature&#8221; Posts in WordPress</h3>
<p>Let&#8217;s keep it simple, agreed?</p>
<p>For Pinterest to grab the Thesis post image from your pages and posts, all you need is a brief PHP entry.</p>
<p>Remember the three buttons from earlier?</p>
<p>If you want the first button &#8212; the simple Pinterest &#8220;Pin It&#8221; with <em>no</em> counter &#8212; add this to <code>custom_functions.php</code>:</p>
<p><img class="aligncenter size-full wp-image-3131" title="Pinterest Pin-It Share Button - No Pin Counter" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-pinterest-horizontal-no-counter.png" alt="Pinterest Pin-It Share Button - No Pin Counter" width="81" height="26" /></p>
<pre class="php">function pinterest_post_page_pin_no_count() {
global $post;
/* HORIZONTAL NO-COUNTER PINTEREST BUTTON */
printf( '&lt;div class="pinterest-posts"&gt;&lt;a href="http://pinterest.com/pin/create/button/?url=%s&amp;media=%s" class="pin-it-button" count-layout="none"&gt;Pin It&lt;/a&gt;&lt;script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"&gt;&lt;/script&gt;&lt;/div&gt;', urlencode(get_permalink()), urlencode( get_post_meta($post-&gt;ID, 'thesis_post_image', true) ) );
}
add_action( 'thesis_hook_before_post_box', 'pinterest_post_page_pin_no_count' );</pre>
<p>For the second button &#8212; &#8220;Pin It&#8221; with a visible &#8220;number of times pinned on Pinterest&#8221; numerical call-out counter &#8212; add this to <code>custom_functions.php</code>:</p>
<p><img class="aligncenter size-full wp-image-3132" title="Pinterest Pin-It Button with Visible Pin Counter" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-pinterest-horizontal-with-counter.png" alt="Pinterest Pin-It Button with Visible Pin Counter" width="81" height="27" /></p>
<pre class="php">function pinterest_post_page_pin_horiz() {
global $post;
/* HORIZONTAL PINTEREST BUTTON WITH COUNTER */
printf( '&lt;div class="pinterest-posts"&gt;&lt;a href="http://pinterest.com/pin/create/button/?url=%s&amp;media=%s" class="pin-it-button" count-layout="horizontal"&gt;Pin It&lt;/a&gt;&lt;script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"&gt;&lt;/script&gt;&lt;/div&gt;', urlencode(get_permalink()), urlencode( get_post_meta($post-&gt;ID, 'thesis_post_image', true) ) );
}
add_action( 'thesis_hook_before_post_box', 'pinterest_post_page_pin_horiz' );</pre>
<p>Finally, if you prefer the vertically-oriented &#8220;Pin It&#8221; button, with a counter &#8212; this works nicely if teamed with the visual style of our prior <a href="http://diythemes.com/thesis/rtfm/add-social-media-counter-buttons/">social media icon</a> tutorial &#8212; then you&#8217;d add this to <code>custom_functions.php</code>:</p>
<p><img class="aligncenter size-full wp-image-3133" title="Vertical Pinterest Button with Visible Counter" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-pinterest-vertical-with-counter.png" alt="Vertical Pinterest Button with Visible Counter" width="81" height="61" /></p>
<pre class="php">function pinterest_post_page_pin_vert() {
global $post;
/* VERTICAL PINTEREST BUTTON WITH COUNTER */
printf( '&lt;div class="pinterest-posts"&gt;&lt;a href="http://pinterest.com/pin/create/button/?url=%s&amp;media=%s" class="pin-it-button" count-layout="vertical"&gt;Pin It&lt;/a&gt;&lt;script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"&gt;&lt;/script&gt;&lt;/div&gt;', urlencode(get_permalink()), urlencode( get_post_meta($post-&gt;ID, 'thesis_post_image', true) ) );
}
add_action( 'thesis_hook_before_post_box', 'pinterest_post_page_pin_vert' );</pre>
<p>Where you want your &#8220;Pins&#8221; to show may vary &#8212; in the above, we configured Pinterest such that the &#8220;Pin It&#8221; shows directly before each full post&#8217;s contents.</p>
<p>To change the location of this Pinterest Pin output, you can adjust the final line in these functions, changing your Pinterest location using the appropriate <a href="http://diythemes.com/thesis/rtfm/hooks/">Thesis hooks</a>.</p>
<p>For fine-tuning of the Pinterest area, note that, in each of the three example PHP functions above, a unique class was assigned to a containing &#8220;div&#8221; element.</p>
<p>This class gives you precise formatting controls.  While its use is optional, it&#8217;s there, and you can use this &#8220;pinterest-posts&#8221; class to fine-tune the position of your &#8220;Pin&#8221; link.</p>
<p>As a starter on potential Pinterest-area formatting, you can &#8212; optionally &#8212; add this to your Thesis <code>custom.css</code> file contents:</p>
<pre class="css">.custom .pinterest-posts { margin-top:2.4em; margin-left:3em; }</pre>
<p>Okay, smooth sailing there &#8212; a Pinterest &#8220;Pin&#8221; should now appear on your site for all posts and pages.</p>
<h3>Add a Pinterest Button to Thesis &#8220;Teaser&#8221; Posts in WordPress</h3>
<p>Want your Thesis <em>teasers</em> to have Pinterest buttons?  Same basic idea, different hook!</p>
<p>The Pinterest button will look something like this when you&#8217;re done:</p>
<p><img class="aligncenter size-full wp-image-3134" title="Thesis Teaser Post with Pinterest Share Button - Count is Zero" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-teaser-post-pinterest-pin-counter-zero.png" alt="Thesis Teaser Post with Pinterest Share Button - Count is Zero" width="226" height="204" /></p>
<p>The &#8220;Pin It&#8221; button is the horizontal &#8220;with counter&#8221; kind, but the counter does not display &#8220;0 pins&#8221; &#8212; it&#8217;ll show numbers once you&#8217;ve received at least <em>one</em> click-through to Pinterest for a given teaser.</p>
<p>To help with formatting, the below uses a custom class as before, where this div surrounds the Pinterest button used in the teaser posts.</p>
<pre class="php">function pinterest_teaser_pin() {
global $post;
printf( '&lt;div class="pinterest-thumbs"&gt;&lt;a href="http://pinterest.com/pin/create/button/?url=%s&amp;media=%s" class="pin-it-button" count-layout="horizontal"&gt;Pin It&lt;/a&gt;&lt;script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"&gt;&lt;/script&gt;&lt;/div&gt;', urlencode(get_permalink()), urlencode( get_post_meta($post-&gt;ID, 'thesis_post_image', true) ) );
}
add_action( 'thesis_hook_before_teaser_headline', 'pinterest_teaser_pin' );</pre>
<p>The hook, <em>thesis_hook_before_teaser_headline</em>, is the only difference of note to achieve a Pinterest button on teasers.</p>
<p>Again as an option, you can add code such as this to your Thesis <code>custom.css</code> file contents for additional control over the Pinterest area in <em>teasers</em> only:</p>
<pre class="css">.custom .pinterest-thumbs { float:right; margin-bottom:0.6em; }</pre>
<p>Because we&#8217;re calling the Thesis post image in all of these examples, Pinterest will display the post image &#8212; not the post thumbnail &#8212; even if the Pinterest &#8220;Pin It&#8221; button is clicked among your teasers.</p>
<p>Which leads us to an interesting question&#8230;</p>
<h3>How Does All This Look to a Pinterest User?</h3>
<p>If you don&#8217;t have a Pinterest account &#8212; and don&#8217;t feel like standing in virtual line to get one &#8212; it&#8217;s still important to know what happens when a Pinterest user clicks your new &#8220;Pin It&#8221; button on feature and teaser posts.</p>
<p>Assuming your site visitor is logged into their Pinterest user account, when they click the teaser &#8220;Pin It&#8221; button, seen earlier above, a window like this will pop into view:</p>
<p><img class="aligncenter size-full wp-image-3135" title="Pinterest - User Perspective - Logged In - Step 1" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-pinterest-user-perspective-first-click.png" alt="Pinterest - User Perspective - Logged In - Step 1" width="594" height="302" /></p>
<p>The post image associated with your teaser &#8212; remember, the thumbnail isn&#8217;t used, the post image is &#8212; is displayed on the left side.</p>
<p>Don&#8217;t worry if your image doesn&#8217;t fill all of the available space seen above; Pinterest crops and sizes images <em>extremely</em> well.</p>
<p>The &#8220;Awesome Eyes&#8221; is a selection from a user-specific dropdown.  It represents a board (imagine a hanging cork-board covered in <del>sticky notes</del> pinned items; you&#8217;ll get the core idea) that the user had previously made in their Pinterest account admin.</p>
<p>Similarly, &#8220;Describe your pin&#8230;&#8221; is user-controlled, and this text can run short or fairly long.  Using more (and more advanced) PHP than we used in this tutorial, the Pinterest description field <em>can</em> be pre-populated by the site owner.  However, the Pinterest user has the final say, and they can quickly change the description &#8212; blank or not.</p>
<p>The red &#8220;Pin It&#8221; button, assuming everything goes fine on the Pinterest side, results in the next screen the Pinterest user sees:</p>
<p><img class="aligncenter size-full wp-image-3136" title="Pinterest Logged-in User Perspective - Step 2" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-pinterest-user-perspective-second-click.png" alt="Pinterest Logged-in User Perspective - Step 2" width="594" height="203" /></p>
<p>Yup, a very typical confirmation page.  However, the &#8220;Tweet your Pin&#8221; and &#8220;Share on Facebook&#8221; options are notable, and just as notable is the <em>non</em>-integration of Pinterest with Google+ or other potential share-through candidates &#8212; at least for now.</p>
<p>Here, potentially, the Pinterest user can share your content &#8212; not only with their fellow Pinterest searchers and followers, but also on up to two other social networks.</p>
<p>At this point, the Pinterest user is done.  If they decide to visit their personalized Pinterest dashboard, this would be the end result:</p>
<p><img class="aligncenter size-full wp-image-3137" title="Pinterest Member Perspective - Personalized Dashboard View" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-pinterest-user-perspective-final-click.png" alt="Pinterest Member Perspective - Personalized Dashboard View" width="616" height="414" /></p>
<p>The &#8220;yoursite.com&#8221; attribution is a nofollow link, for those who might be curious.</p>
<p>The &#8220;pinmarklet&#8221; is a reference to the &#8220;Pin It&#8221; button you created.  As you can see, Pinterest says &#8220;pinmarklet&#8221; twice in short order.</p>
<p>In this tutorial, we went with &#8220;Pin it&#8221; instead of referring to your &#8220;pinmarklets&#8221; a million times &#8212; learning about Pinterest shouldn&#8217;t be<em> painful</em>.</p>
<p>Because a Pinterest User successfully <del>pinmarkleted</del> pinned your teaser&#8217;s post image, your site will now increment the pin-count for the post in question.</p>
<p>Once past a goose egg &#8212; if its value is zero, the counter does not display &#8212; the Pin It counter will begin to show numbers:</p>
<p><img class="aligncenter size-full wp-image-3138" title="Thesis Teaser with a Pinterest Pin and Incremented Count" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-teaser-post-pinterest-pin-counter-one.png" alt="Thesis Teaser with a Pinterest Pin and Incremented Count" width="226" height="204" /></p>
<p>You&#8217;re all done!</p>
<p>Quite possibly, you&#8217;re wondering enough about Pinterest to check it out from the other side of the fence, the Pinterest user side &#8212; and you should.</p>
<p>Compared to &#8220;old&#8221; social sharing sites, at least for now, Pinterest has the feel of a low-pressure, friendly gathering.  Unless you ask it to be, Pinterest isn&#8217;t just an endless, scrolling wall of information, nor is there a strong sense of follower-count &#8220;high score!&#8221; guilt.</p>
<p>Pinterest might become the next Twitter.  And it might not.</p>
<p>Whatever Pinterest&#8217;s future, one thing&#8217;s a certainty &#8212; if you climb on board, you&#8217;ll see <em>lots</em> of pretty pictures!</p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/add-pinterest-pins-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customize the Password Form on Protected Posts</title>
		<link>http://diythemes.com/thesis/rtfm/password-protected-form/</link>
		<comments>http://diythemes.com/thesis/rtfm/password-protected-form/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 22:21:11 +0000</pubDate>
		<dc:creator>Shelley</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3061</guid>
		<description><![CDATA[When you password protect a post in WordPress, a form is displayed prompting the reader to enter the password to view the post: Using the WordPress filter the_password_form along with some custom code in your Thesis custom_functions.php file, you can modify various text elements in the password form. You can change the explanatory prompt message, [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>When you password protect a post in WordPress, a form is displayed prompting the reader to enter the password to view the post:</p>
<p><div id="attachment_3063" class="wp-caption aligncenter" style="width: 499px">
	<a href="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/password_protected.jpg"><img src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/password_protected.jpg" alt="Default Password Form on Protected Post" title="Default Password Form on Protected Post" width="499" height="202" class="size-full wp-image-3063" /></a>
	<p class="wp-caption-text">Default Password Form on Protected Post</p>
</div></p>
<p>Using the WordPress filter <code>the_password_form</code> along with some custom code in your Thesis <em>custom_functions.php</em> file, you can modify various text elements in the password form. You can change the explanatory prompt message, the label of the password field, the text on the submit button &#8212; or all three of these at once.</p>
<p class="note">Note that, in each of the following examples, the <code>$after</code> variable is what determines the replacement text &#8212; simply replace the example text contained <em>inside</em> each pair of single quotes with your own desired text (be sure to retain the single quotes themselves to avoid triggering a PHP syntax error).</p>
<h3 id="prompt">Change Prompt Message <a href="#prompt" title="Link to this section">∞</a></h3>
<pre class="php">
function custom_password_prompt($content) {
	$before = 'This post is password protected. To view it please enter your password below:';
	$after = 'Enter your password to view this post:';
	$content = str_replace($before, $after, $content);
	return $content;
}
add_filter('the_password_form', 'custom_password_prompt');
</pre>
<h3 id="password">Change &#8220;Password&#8221; Text <a href="#password" title="Link to this section">∞</a></h3>
<pre class="php">
function custom_password_text($content) {
	$before = 'Password:';
	$after = 'Custom Password Text:';
	$content = str_replace($before, $after, $content);
	return $content;
}
add_filter('the_password_form', 'custom_password_text');
</pre>
<h3 id="submit">Change Submit Button Text <a href="#submit" title="Link to this section">∞</a></h3>
<pre class="php">
function custom_submit_text($content) {
	$before = 'Submit';
	$after = 'Custom Submit Text';
	$content = str_replace($before, $after, $content);
	return $content;
}
add_filter('the_password_form', 'custom_submit_text');
</pre>
<h3 id="all">Change All Three of the Above at Once <a href="#all" title="Link to this section">∞</a></h3>
<pre class="php">
function custom_password_form($content) {
	$before = array('This post is password protected. To view it please enter your password below:','Password:','Submit');
	$after = array('Enter your password to view this post:','Custom Password Text:','Custom Submit Text');
	$content = str_replace($before,$after,$content);
	return $content;
}
add_filter('the_password_form', 'custom_password_form');
</pre>
<p><div id="attachment_3064" class="wp-caption aligncenter" style="width: 371px">
	<a href="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/password_protected_custom.jpg"><img src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/password_protected_custom.jpg" alt="Customized Password Form on Protected Post" title="Customized Password Form on Protected Post" width="371" height="201" class="size-full wp-image-3064" /></a>
	<p class="wp-caption-text">Customized Password Form on Protected Post</p>
</div></p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/password-protected-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Thesis SEO Options and Settings</title>
		<link>http://diythemes.com/thesis/rtfm/wordpress-thesis-seo-tutorial/</link>
		<comments>http://diythemes.com/thesis/rtfm/wordpress-thesis-seo-tutorial/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 02:07:57 +0000</pubDate>
		<dc:creator>godhammer</dc:creator>
				<category><![CDATA[Thesis Options]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3027</guid>
		<description><![CDATA[The WordPress SEO section discusses applied SEO strategies. As you know, Thesis provides numerous SEO settings and options in the administration interface. Familiarity with these Thesis SEO interface options will help you make the most of the WordPress SEO articles&#8217; concepts and advice. SEO is a large topic &#8212; where it begins and ends is [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>The <a href="http://diythemes.com/thesis/wordpress-seo/">WordPress SEO</a> section discusses <em>applied</em> SEO strategies.</p>
<p>As you know, Thesis provides numerous SEO settings and options in the administration interface.</p>
<p>Familiarity with these Thesis SEO interface options will help you make the most of the WordPress SEO articles&#8217; concepts and advice.</p>
<p>SEO is a large topic &#8212; where it begins and ends is a gray area.</p>
<p>Shake the magical dust from SEO, however, and you&#8217;re left with a very simple &#8220;my site&#8221; goal &#8212; optimizing your content for search engines.</p>
<p>Fundamentally, <em>optimization</em> means clarifying what your site, and individual pages of content within your site, are all about.  That&#8217;s it!</p>
<p>In the real world, imagine a book without a title.</p>
<p><img class="aligncenter size-full wp-image-3033" title="Judging a Book by Its Lack of Title and Description" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2011/12/sample-book-no-title-no-description.png" alt="Judging a Book by Its Lack of Title and Description" width="272" height="320" /></p>
<p>Would you buy such a book?</p>
<p>Probably not.  Unless you find more information about the unknown content, you&#8217;ll leave it on the shelf.</p>
<p>Whether you imagine books in a library or a list of search results (sites) to choose among, information is everything.</p>
<p>With millions of options out there, selecting your reading at random is an inefficient way to make decisions on how to spend your time.</p>
<p>That&#8217;s why we often <em>do</em> judge books (and sites) by their covers.</p>
<p>A book with a confusing title &#8212; or no title at all &#8212; reduces &#8220;first glance&#8221; comprehension by an onlooker.</p>
<p>Your site is no different. Books &#8212; where this is especially true for nonfiction &#8212; need a clear and descriptive title that gives a potential reader at least some understanding of what they can expect to find inside.</p>
<p>All the parts and pages of your web site?  Exactly the same deal.</p>
<p>Along with a title, your site also needs descriptive text and other &#8220;what&#8217;s this all about?&#8221; information to give your potential visitors the ability to confirm your content matches what they search to find.  Online, finding typically means using a search engine like Google or Bing.</p>
<p>Basic SEO, therefore, is about offering &#8220;first glance&#8221; information about your site.  To add this, let&#8217;s examine the relevant areas of SEO within the <strong>Thesis 1.8.2</strong> interface.</p>
<p>The focus here is on the <em>how and where</em> of the Thesis interface SEO options.  With a grasp on how and where, you&#8217;ll be able to maximize your search engine rankings, as well as more easily digest the WordPress SEO series.</p>
<p>The following are the main SEO-related content areas in Thesis: <em>global</em> or site-wide SEO, <em>home page</em> SEO, <em>category</em>-specific SEO, and individual SEO settings on <em>posts</em> and <em>pages</em>.</p>
<p>All this SEO stuff, at a basic, on-site level, is easier than it sounds &#8212; we&#8217;ll take each section in turn, step-by-step.</p>
<p>In this one tutorial, you&#8217;ll quickly see that SEO basics are extremely powerful &#8212; and they&#8217;re <em>not</em> scary whatsoever.</p>
<h3>Global SEO Settings in the Thesis Interface</h3>
<p>A global setting simply means that the options selected apply &#8220;everywhere&#8221; on your site &#8212; home, pages, posts, categories, tags &#8212; everywhere.</p>
<p>There&#8217;s only one global SEO setting of major significance, and that&#8217;s whether or not to have &#8220;Append site name to page titles&#8221; selected.</p>
<p>Here is where we are in the Thesis interface:</p>
<p><code>WP Admin &gt; Thesis &gt; Site Options &gt; Document Head &gt; [ here ]</code></p>
<p>Which appears visually like this:</p>
<p><img class="aligncenter size-full wp-image-3041" title="Append Site Name and Character Separator Globally" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2011/12/sample-global-seo-append-site-name.png" alt="Append Site Name and Character Separator Globally" width="300" height="295" /></p>
<p>Except in very rare cases, it&#8217;s usually low, no, or a negative to your site SEO to append the site name to your page titles.</p>
<p>If your site title is only a word or two, it can make sense.  But even then &#8212; usually not.</p>
<p>The reason you don&#8217;t need to append your site title to every page is that your site <em>flows</em> with <del>Yoda calls it the Force</del> PageRank.</p>
<p>In other words, search engines move through your site in a way that creates a series of relationships.  From these relationships, an understanding of the site&#8217;s context and influences is created.</p>
<p>A page, therefore, is not an isolated blip on the radar.  Each page &#8212; using &#8220;page&#8221; in the sense of any URL &#8212; inherits traits from other pages.  The verbiage and links, to and from other pages &#8212; including the (relatively) powerful home page &#8212; are influential.</p>
<p>As a result, even if your site name appears <em>only</em> on the home page, that&#8217;s usually sufficient.</p>
<p>Once Google knows your site name, everything else is seasoned within the context of the site name and other global factors &#8212; not all of which are on your site, or even within your full control.</p>
<p>Adding the site name <em>globally</em> therefore often does little more than dilute the SEO value of non-home <code>&lt;title&gt;</code> markup.  Any gains from site-wide appending (repetition) seldom offset this dilution.</p>
<p>With a strong brand, especially a short one &#8212; Sony, Asus, IBM, Apple &#8212; appending the site name to your <code>&lt;title&gt;</code> globally can be a rational decision.</p>
<p>However, if you&#8217;re just getting started &#8212; especially if your &#8220;brand&#8221; is relatively unknown &#8212; it&#8217;s recommended you do not append the site name globally.</p>
<h3>Home Page SEO Settings in the Thesis Interface</h3>
<p>Out of the box, in Thesis the home page SEO is controlled in the following area:</p>
<p><code>WP Admin &gt; Thesis &gt; Site Options &gt; Home Page SEO &gt; [ here ]</code></p>
<p>In this section are the Home Page SEO controls for the <code>&lt;title&gt;</code> of your home page, the description for the home page, its meta keywords, and checkboxes that determine whether your home page is indexed, followed, and/or archived.  These can be seen in the below:</p>
<p><img class="aligncenter size-full wp-image-3042" title="Home Page Default SEO Settings in Thesis" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-home-page-seo-default.png" alt="Home Page Default SEO Settings in Thesis" width="300" height="353" /></p>
<p>Note that this Home Page SEO control applies only if you are using the default &#8220;blog home&#8221; &#8212; if you are using a <a href="http://diythemes.com/thesis/rtfm/configure-static-front-posts-pages/">static home page</a>, the SEO controls for your &#8220;Home&#8221; page will be located in the settings for the individual <em>page</em> used as the static front page.  We&#8217;ll cover page-specific SEO later.</p>
<p><strong>Home Page SEO &#8212; the <code>&lt;title&gt;</code></strong> &#8212; this one&#8217;s a big deal.</p>
<p>The <code>&lt;title&gt;</code> carries a ton of SEO power, and on your home page it carries more than it will anywhere else. As you can see in the image above, there&#8217;s a character counter in Thesis to help you limit this field to the number of characters traditionally shown by Google in a &#8220;SERP&#8221; or &#8220;search engine results page&#8221; &#8212; but you don&#8217;t have to &#8220;fill it up&#8221; &#8212; in this setting, less is often more.</p>
<p>While true of other SEO-related content, in the <code>&lt;title&gt;</code> especially, <em>every word</em> should be chosen with care.</p>
<p>Let&#8217;s say your first thought for a Home Page <code>&lt;title&gt;</code> is:</p>
<blockquote><p>Welcome to SuperTreeExpertPeople.com &#8212; If You Have Trees, Plants, Bushes, Shrubs, or Grass You Need Worked On, We Can Do Anything! Call us Now if You Need Tree-Related Services in Fargo, North Dakota!</p></blockquote>
<p>Clearly, that&#8217;s too long.  It&#8217;s also using numerous terms that are unlikely to help your site, even if you <em>did</em> rank for them &#8212; &#8220;Welcome&#8221; being an example.</p>
<p>Search Engines are good at inferring specific place names, so &#8220;North Dakota&#8221; is unnecessary, especially if you include your address (as text) on a contact page or in your footer or header.</p>
<p>For your Home Page <code>&lt;title&gt;</code>, focus on what you already do &#8212; and do well.  If you&#8217;re new to the market, focus on what you expect or <em>want to do</em> more often.  For example, if you get most of your net profits from tree-related &#8220;stuff&#8221; &#8212; but very little from shrubs &#8212; then stick to what works.</p>
<p>This would be a shorter, more powerful example:</p>
<blockquote><p>Fargo Tree Services | Trimming &#8211; Stump Removal &#8211; Fertilizing</p></blockquote>
<p>While this is better than the previous example, it&#8217;s important to realize SEO is not about instant perfection, and SEO done well is not just &#8220;set and forget&#8221; &#8212; installing monitoring code such as <a href="http://diythemes.com/thesis/rtfm/how-to-add-google-analytics/">Google Analytics</a> can help you determine what&#8217;s working, what&#8217;s not &#8212; and this will help you make informed changes to your SEO tactics over time.</p>
<p><strong>Home Page SEO &#8212; the meta description</strong> &#8212; the &#8220;SEO&#8221; factor that does <em>not</em> have a direct SEO impact.  That&#8217;s right.  Your meta description does not influence the &#8220;rank&#8221; or position of your site in search engines.  It&#8217;s not SEO!</p>
<p>Okay &#8212; so if the meta description isn&#8217;t a technical SEO factor, why worry about it?</p>
<p>The answer is that your meta description is an influence, and to ignore it is to miss the point of SEO in a larger context.  You&#8217;re optimizing and defining your content, right?  You&#8217;ve seen search results many times, and while the eye is drawn to the &#8220;title&#8221; first, the description is the <em>convincing blurb</em> right below the title.</p>
<p>That makes your meta description &#8220;SEO that isn&#8217;t SEO&#8221; &#8212; because while the description is not an SEO ranking factor, a good description is still a &#8220;call to action&#8221; &#8212; and it will often be the difference between visitors clicking your site&#8230; or clicking on a competitor&#8217;s link!</p>
<p>Also, any terms used in a query to find your site that match the meta description&#8217;s content will be <strong>bold</strong> in search results, another reason a good description is useful as an &#8220;SEO&#8221; factor.</p>
<p>Taking an example, a search for &#8220;Thesis Documentation&#8221; in Google returns a SERP &#8212; a search engine results page &#8212; like this, where the arrow indicates the meta description:</p>
<p><img class="aligncenter size-full wp-image-3043" title="Sample Google SERP highlighting the meta description field" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-google-serp-meta-description.png" alt="Sample Google SERP highlighting the meta description field" width="541" height="79" /></p>
<p>It&#8217;s obvious that your meta description should be created with care. Unlike the brief <code>&lt;title&gt;</code> recommended earlier, it&#8217;s best to make your meta description close to the maximum length that will be displayed by Google.</p>
<p>Why go long?</p>
<p>Short meta descriptions are often replaced by &#8220;rich snippets&#8221; &#8212; pieces of your content stitched together by a search engine like Google, using text from the page rather than the meta description you added manually.</p>
<p>Because the meta description is a good conversion tool, representing a call to action (click!) &#8212; write a good one, and make it long enough that your meta description is more likely to be chosen as the content Google displays to potential visitors.</p>
<p>In the Thesis interface, the meta description for the Home Page is one down from <code>&lt;title&gt;</code> like so:</p>
<p><img class="aligncenter size-full wp-image-3044" title="Sample SEO Home Page Meta Description" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-home-page-seo-default-description.png" alt="Sample SEO Home Page Meta Description" width="300" height="353" /></p>
<p>As a rule of thumb, add about 150 characters of quality &#8220;I&#8217;d click that!&#8221; content to your meta description.</p>
<p>Remember, this is your home page, so target your prospects broadly.  Be sure to provide solid reasons to click on <em>your</em> site!</p>
<p>You could include a list of your services, your solutions to common client problems, FAQ or trust-building information such as being &#8220;insured&#8221; or &#8220;licensed&#8221; or a member of the &#8220;BBB&#8221; &#8212; anything to generate (legitimate, of course) trust and authority in your area of specialization.</p>
<p><strong>Home Page SEO &#8212; the meta keywords</strong> &#8212; like the meta description, meta keywords are of no SEO benefit.  <em>Unlike</em> the meta description, meta keywords do not offer any other benefit for the vast majority of sites &#8212; and they aren&#8217;t visible in the search results listings.</p>
<p>About the only thing to say about meta keywords is to avoid &#8220;stuffing&#8221; more than a few key terms or words into this field.  The tactic of &#8220;keyword stuffing&#8221; &#8212; adding dozens or even hundreds of key terms &#8212; was the primary reason why meta keywords became worth little (if anything) many years ago.</p>
<p>As you might guess, leaving the meta keywords <em>blank</em> is fine.</p>
<p><strong>Home Page SEO &#8212; nofollow, noindex, noarchive</strong> &#8212; because these checkboxes are included in the interface, a quick word on them.</p>
<p>Do <strong>not</strong> click <em>nofollow</em> or <em>noindex</em> in your Home Page SEO options.</p>
<p>Simplifying for clarity, using nofollow/noindex on your Home Page tells search engines &#8212; like Google &#8212; <em>not</em> to include your site in search results.  Ever.  Ouch!</p>
<p>Unlike nofollow and noindex, <em>noarchive</em> is less of an SEO-related decision.  Noarchive is a choice to tell various web sites, including search engines, whether or not they should maintain a history &#8212; a saved cache &#8212; of your site&#8217;s home page.</p>
<p>From an SEO standpoint, noarchive is unlikely to have an impact on your site.  But unless you have a full understanding of what it does, there&#8217;s no harm in leaving it unchecked.</p>
<p>In summary, leave the checkboxes for nofollow, noindex, and noarchive alone &#8212; meaning, not checked &#8212; on your Home Page SEO settings.</p>
<h3>Category SEO Settings in the Thesis Interface</h3>
<p>If you use categories for your posts and include categories in your site architecture as an SEO device &#8212; most Thesis users do &#8212; then you&#8217;ll benefit from applying the same principles of SEO discussed in the Home Page section on your categories.</p>
<p>In short, populate your categories&#8217; <code>&lt;title&gt;</code> and meta description, with the contents adjusted to fit each of your categories.</p>
<p>Here is where we are in the WordPress (contains additions from Thesis) interface:</p>
<p><code>WP Admin &gt; Posts &gt; Categories &gt; [ here ]</code></p>
<p>There are two ways to add your SEO details to categories &#8212; you can either create a <em>new</em> category, or you can edit an <em>existing</em> category.  The layouts are slightly different, but they&#8217;re close enough it&#8217;s assumed explaining one explains both as regards the SEO sections.</p>
<p><strong>Category SEO Settings &#8212; Part I</strong></p>
<p>Taking the &#8220;add a new category&#8221; option for a visual example, the first area related to SEO looks like this &#8212; the two sections are one on top of the other, but for discussion purposes, they&#8217;re split into two images below:</p>
<p><img class="aligncenter size-full wp-image-3045" title="Sample Category SEO Thesis Interface Part I" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-category-seo-thesis-interface-one.png" alt="Sample Category SEO Thesis Interface Part I" width="497" height="439" /></p>
<p>The SEO fields above are blank when creating a new category.  They&#8217;re shown with populated data to serve as a quick summary of what a completed &#8212; individual &#8212; category&#8217;s SEO content might look like when finished.</p>
<p>Above you&#8217;ll again notice the <code>&lt;title&gt;</code> and like the Home Page SEO, this field should be under 70 characters &#8212; shorter is fine &#8212; and very succinct.  Remove filler words, but remember that real visitors will see this content &#8212; make sure it reads fluently and conveys the basic idea of the category&#8217;s contents.</p>
<p>The meta description also returns, and again it&#8217;s not an SEO factor &#8212; but it remains a &#8220;convincer&#8221; &#8212; the time spent on a quality meta description is worth extra effort if your categories are common landing points for visitors.</p>
<p>Finally, adding or editing a category&#8217;s meta keywords can be skipped &#8212; or at most, keep the meta keywords to a minimum.</p>
<p><strong>Category SEO Settings &#8212; Part II</strong></p>
<p>Again as seen in the Home Page SEO setting, if you&#8217;re using categories as part of your optimization strategy, they need to be followed and indexed.  Archived or not is up to you &#8212; it&#8217;s not an SEO factor.</p>
<p><img class="aligncenter size-full wp-image-3046" title="Sample Category SEO Thesis Interface Part II" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2012/01/sample-category-seo-thesis-interface-two.png" alt="Sample Category SEO Thesis Interface Part II" width="497" height="457" /></p>
<p>Compared to the Home Page SEO settings, your categories get two additional SEO-relevant sections.  These fields are similar to the <em>visible</em> H1 &#8220;title&#8221; and content of individual posts and pages.</p>
<p>The Introductory Headline field contents will appear as text on your category landing page &#8212; it will be wrapped in H1 tags.  The Header One or &lt;h1&gt; tag is a second-tier SEO device &#8212; important, but not as important as the <code>&lt;title&gt;</code> you created in Part I.</p>
<p>As a rule of thumb, make your Introductory Headline relevant to the category&#8217;s posts. If you&#8217;re working with a category about evergreen trees, you&#8217;d probably include the word &#8220;evergreen&#8221; in the Introductory Headline.</p>
<p>The Introductory Content has no more SEO value than any other &#8220;paragraph&#8221; of content.  However, because category pages are otherwise &#8220;a list of posts&#8221; the content here is potentially more &#8220;important&#8221; than pages or posts &#8212; because post and pages often have many paragraphs of unique content.</p>
<p>What you write for Introductory Content is not only useful to your visitors, it can help individual categories stand on their own legs from an SEO perspective &#8212; thus making your categories more than just a temporary dumping zone for assigned posts.</p>
<p>How much Introductory Content you add is up to you &#8212; describing the category&#8217;s posts should offer natural opportunities for using key terms throughout this section.</p>
<h3>Individual Post &amp; Page SEO Settings in the Thesis Interface</h3>
<p>First off, it&#8217;s worth noting that Thesis will &#8220;create&#8221; a <code>&lt;title&gt;</code> and meta description for your posts and pages automatically, in the event you do not create manual SEO data for individual posts and pages.</p>
<p>For sites with high volumes of low-quality content, that&#8217;s probably good enough.  But for unique, high-quality content, leaving your <code>&lt;title&gt;</code> and meta description to automation is the SEO equivalent of using a rubber stamp to sign birthday cards.</p>
<p>If you cared enough to write that page or post, spend a minute or two on the SEO.   Again, the meta description won&#8217;t climb the ranks for you, but an automatic excerpt for a meta description is not as convincing &#8212; convincing to visitors you want to click-through from a search results page &#8212; as a hand-crafted description.</p>
<p>If you&#8217;re still not convinced, again, with Thesis you don&#8217;t <em>have</em> to write SEO details for every last page and post.  But you should.</p>
<p>Here is where we are in the Thesis interface:</p>
<p><code>WP Admin &gt; Posts &gt; Add New &gt; SEO Details and Additional Style &gt; [ here ]</code></p>
<p><code>WP Admin &gt; Pages &gt; Add New &gt; SEO Details and Additional Style &gt; [ here ]</code></p>
<p>The difference is &#8212; almost nothing.  Pages and posts, for SEO purposes, are very similar URL types.  Thus, whether you&#8217;re adding or editing a page or a post, visually you&#8217;ll see this underneath your WordPress text editor:</p>
<p><img class="aligncenter size-full wp-image-3039" title="Thesis Post or Page SEO Input Fields" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2011/12/sample-page-post-seo-fields.png" alt="Thesis Post or Page SEO Input Fields" width="596" height="336" /></p>
<p>Remember, way back, when SEO was declared not-scary?  If you&#8217;ve already read the Global, Home, and Category portions of this tutorial, how <del>bored</del> scared are you right now?</p>
<p>For SEO purposes, add a <code>&lt;title&gt;</code>, then add a meta description. The meta keywords remain of low or no value.  Do not check noindex or nofollow for an individual page/post unless you have a good reason to do so &#8212; an isolated or very temporary landing page could be an example.</p>
<p>How easy was that?  You&#8217;re practically an SEO rock star!</p>
<p>Notable at this point is that our Thesis SEO walk-through has gone from top to bottom.</p>
<p>At a very high level were the Global and Home Page SEO settings.  A step down &#8212; because presumably you have more than one &#8212; were the categories, where SEO details for categories should be more specific than the Global or Home sections.</p>
<p>Finally, you&#8217;re down to a single unit of content, a page or post.  Here, it&#8217;s all in the details.  Really specific ones!</p>
<p>Taking the <code>&lt;title&gt;</code> as an example of the progression from broad to focused, your Home Page SEO was all-inclusive.  Remember the example of a tree service?  Here it is again:</p>
<blockquote><p>Fargo Tree Services | Trimming &#8211; Stump Removal &#8211; Fertilizing</p></blockquote>
<p>That&#8217;s an SEO shotgun. However, one of your <em>categories</em> would drill-down into a more specific area, such as &#8220;Trimming&#8221; &#8212; and a sub-category to &#8220;Trimming&#8221; like &#8220;Hedge Trimming&#8221; would become more detailed yet.  The <code>&lt;title&gt;</code> and meta description would &#8220;zoom in&#8221; more for a category than the Home Page SEO choices.</p>
<p>For example, if you had a category on &#8220;Hedge Trimming&#8221; then the same SEO component used on the Home Page &#8212; the <code>&lt;title&gt;</code> &#8212; might go like this:</p>
<blockquote><p>Hedge Trimming | Evergreen Health and Maintenance</p></blockquote>
<p>And now, with a <em>post</em> in the &#8220;Hedge Trimming&#8221; category, you&#8217;ll dig even deeper into SEO detail.</p>
<p>Composing a post that offers free advice to potential customers?  Your SEO for a single post&#8217;s <code>&lt;title&gt;</code>, within the category of Hedge Trimming, might look like this:</p>
<blockquote><p>How to Winterize a Cedar Windbreak Using Electric Shears</p></blockquote>
<p>With careful top-down SEO &#8212; where the Home Page feeds into a Category that feeds into a single Post &#8212; you&#8217;re all set.</p>
<p>Heads-up, Fargo Tree People!  There&#8217;s a new player in the SERPs &#8212; one with a solid grasp on basic WordPress SEO.</p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/wordpress-thesis-seo-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add Frames to Individual Images in WordPress</title>
		<link>http://diythemes.com/thesis/rtfm/how-to-add-frames-images-wp/</link>
		<comments>http://diythemes.com/thesis/rtfm/how-to-add-frames-images-wp/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 01:52:42 +0000</pubDate>
		<dc:creator>godhammer</dc:creator>
				<category><![CDATA[Posts & Pages]]></category>

		<guid isPermaLink="false">http://diythemes.com/thesis/rtfm/?p=3012</guid>
		<description><![CDATA[Some images look better with a &#8220;picture frame&#8221; &#8212; and some look better standalone. When Should You Use A Frame On Your Images examined the when and why of using image frames. But you may be wondering how to work with framed images on a one-by-one basis. To illustrate what is meant by framing an [...]]]></description>
			<content:encoded><![CDATA[</p>
<p>Some images look better with a &#8220;picture frame&#8221; &#8212; and some look better standalone.</p>
<p><a href="http://diythemes.com/thesis/frames-images-blog/">When Should You Use A Frame On Your Images</a> examined the <em>when and why</em> of using image frames.</p>
<p>But you may be wondering <em><strong>how</strong></em> to work with framed images on a one-by-one basis.</p>
<p>To illustrate what is meant by <em>framing</em> an image, the graphic below shows three versions of an image that is presumed to be in-context in a post or page.</p>
<p><img class="aligncenter size-full wp-image-3013" title="Three examples of image frames in WordPress" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2011/12/sample-three-framed-images.png" alt="Three examples of image frames in WordPress" width="551" height="182" /></p>
<p>On the left is the image without an image frame.</p>
<p>In the middle, the same image appears with the default &#8220;frame&#8221; class.</p>
<p>On the right, a unique class has been added &#8212; where CSS values have been created in <code>custom.css</code> to differentiate this frame from the gray defaults of the &#8220;frame&#8221; class.</p>
<p>Let&#8217;s examine various scenarios to get either a default or unique image &#8220;picture frame&#8221; on individual images.</p>
<h3>Image Frames in the WordPress Visual Tab</h3>
<p>Inserting images in the Visual tab is simple, and adding a class for your frame to one or more images can be done at least two different ways.</p>
<p><strong>1. How to Add Single Image Frames Using &#8220;Advanced Settings&#8221;</strong></p>
<p>We&#8217;ll assume you already know how to add an image using the Upload/Insert method in the Visual tab.</p>
<p>Once you have an image visible in your post or page, classes such as <code>class="framed-image"</code> or the predefined <code>class="frame"</code> can be added to individual images by right-clicking the image in the post editor.</p>
<p>Next, click the small &#8220;picture&#8221; icon that appears over the left-top of your image, and finally, click &#8220;Advanced Settings&#8221; at the top of the light-boxed area&#8217;s tabs.</p>
<p><img class="aligncenter size-full wp-image-3014" title="Clicking the Image Editor in the Visual Tab" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2011/12/sample-visual-editor-click-frame-image.png" alt="Clicking the Image Editor in the Visual Tab" width="498" height="155" /></p>
<p>In the Advanced Settings you should see a field labeled &#8220;CSS Class&#8221; &#8212; an existing class such as &#8220;alignnone&#8221; may already be there.</p>
<p>Add a space after any existing classes, then add your code, where again the options used in this tutorial are <code>framed-image</code> or <code>frame</code> &#8212; then click &#8220;Update&#8221; such that the lightbox disappears.</p>
<p><img class="aligncenter size-full wp-image-3015" title="Visual Editor -- Advanced Settings for Image Editing" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2011/12/sample-visual-editor-edit-frames.png" alt="Visual Editor -- Advanced Settings for Image Editing" width="441" height="225" /></p>
<p>The single image addressed will now have a frame.  While the frame might not appear in the Visual Editor, it can be viewed on your site either by clicking &#8220;Preview&#8221; or &#8220;Update&#8221; within the admin interface.</p>
<p>Using a class such as &#8220;framed-image&#8221; instead of the predefined &#8220;frame&#8221; class presumes &#8220;framed-image&#8221; has been defined in the <code>custom.css</code> file contents like so:</p>
<pre class="css">.custom .framed-image {
padding:0.692em;
background:#F7EFDB;
border-color: #E0D5BB;
border-width:0.077em;
border-style:solid;
}</pre>
<p>The above is similar to the values used by the default &#8220;frame&#8221; class, but applies non-default values for a unique background and border color.  These unique values produce the image frame seen in the right-side illustration at the top of this tutorial.</p>
<p>For a unique class such as <code>framed-image</code> to make sense, the CSS should contain differences relative to the default &#8220;frame&#8221; CSS &#8212; otherwise, additional steps result in no visible gain.</p>
<p><strong>2. How to Add Multi-Image Frames Using a CSS Body Class</strong></p>
<p>The other option for assigning frames to images in the Visual editor is to add a custom CSS class to the entire post or page.  By doing so, multiple images can be addressed with your custom image frame &#8212; all at the same time.</p>
<p>This option is possible by scrolling down the post being edited, moving beyond the post/page content editor to the fields below.</p>
<p>The CSS Class option can be used if you wish to add an image frame to <em>all images</em> in the post or page being edited.  In the below, the class <code>all-framed</code> has been added:</p>
<p><img class="aligncenter size-full wp-image-3016" title="Body-Level Class Assignation for Global Image Frames" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2011/12/sample-body-level-css-class-naming.png" alt="Body-Level Class Assignation for Global Image Frames" width="353" height="94" /></p>
<p>This will apply a body-level class, so to target <em>only</em> images in your post or page contents &#8212; not images in the header, sidebars, comments, etc &#8212; provide additional targeting via selector in your <code>custom.css</code>:</p>
<pre class="css">.custom.all-framed .format_text img {
padding:0.692em;
background:#ccc;
border-color: #111;
border-width:0.077em;
border-style:solid;
}</pre>
<p>Notice the class used here is neither &#8220;framed&#8221; nor &#8220;framed-image&#8221; &#8212; these were used in previous examples.  The <code>all-framed</code> class lets you apply a global frame to images on one post/page &#8212; but you can still override this with the previous classes to achieve specific exceptions within the given post or page.</p>
<h3>Image Frames in the WordPress HTML Tab</h3>
<p>Adding a special class to images in the WordPress HTML tab of the page/post editor is not difficult.  If you are editing a post or page, there are two methods in the HTML tab to add an image.  Either reaches a similar conclusion.</p>
<p><strong>1. Add a Frame Class to Images in the HTML Tab &#8212; Upload/Insert.</strong></p>
<p>The first option is to use the Upload/Insert icon in the HTML editor tab to insert an image.</p>
<p>This method is very similar to the Visual Tab method discussed previously.  To begin, an image can be dragged into a media box when the Upload/Insert icon is clicked &#8212; other options include selecting images from your media library or URL.</p>
<p>As an aside, note that images with <em>captions</em> get a frame by default.  While the captioned frame can <em>also</em> be uniquely styled &#8212; it has CSS values similar to the &#8220;frame&#8221; class &#8212; modifications to captioned images fall beyond the scope of this tutorial.</p>
<p>With a &#8220;no caption&#8221; image added via your HTML editor, you should see code like this:</p>
<pre>&lt;img alt="xxxxx" src="http://YOUR_DOMAIN.com/IMAGE_FILENAME.png"
title="xxxxxx" class="alignnone" width="xxxxx" height="xxxxx" /&gt;</pre>
<p>Areas with &#8220;xxxxx&#8221; placeholders would contain values, of course.</p>
<p>To apply an existing class to the image above &#8212; to apply the default &#8220;gray&#8221; frame &#8212; simply add <code>class="frame"</code> to the code in your HTML editor pane, as shown below:</p>
<pre>&lt;img alt="xxxxx" src="http://YOUR_DOMAIN.com/IMAGE_FILENAME.png"
title="xxxxxx" class="alignnone frame" width="xxxxx" height="xxxxx" /&gt;</pre>
<p>To add a <em>custom</em> class to this single image, type <code>class="framed-image"</code> as shown, giving your image code a unique CSS class:</p>
<pre>&lt;img alt="xxxxx" src="http://YOUR_DOMAIN.com/IMAGE_FILENAME.png"
title="xxxxxx" class="alignnone framed-image" width="xxxxx" height="xxxxx" /&gt;</pre>
<p>Again, the difference between these two classes is that using a unique class &#8212; it doesn&#8217;t need to be named &#8220;framed-image&#8221; &#8212; you can redefine the image frame&#8217;s values.  This allows visual modifications that are <em>unlike</em> the gray, default class of <code>frame</code>.</p>
<p>As mentioned in the Visual tab methods, using a unique CSS class requires CSS values be added to your <code>custom.css</code> file contents.</p>
<p><strong>2. Add a Frame Class to Images in the HTML Tab &#8212; IMG icon.</strong></p>
<p>The second option is to click the &#8220;img&#8221; icon in the HTML tab&#8217;s interface.</p>
<p><img class="aligncenter size-full wp-image-3017" title="Clicking the IMG icon in the WP Editor -- HTML tab" src="http://diythemes.com/thesis/rtfm/wp-content/uploads/2011/12/sample-img-icon-clicked-html-tab.png" alt="Clicking the IMG icon in the WP Editor -- HTML tab" width="490" height="75" /></p>
<p>Once &#8220;img&#8221; is clicked, you&#8217;ll be asked in a sequence of pop-ups for the URL of the image and a &#8220;Description&#8221; &#8212; the description field will be the image &#8220;alt&#8221; or alternate text.</p>
<p>The result is succinct HTML code, to which you can add the same <code>class="framed-image"</code> or <code>class="frame"</code> values as was described in the Upload/Insert method.</p>
<p>Beginning with the unmodified code, you&#8217;ll see a line like this:</p>
<pre>&lt;img src="http://YOUR_DOMAIN.com/IMAGE_FILENAME.png" alt="" /&gt;</pre>
<p>To use the default &#8220;gray frame&#8221; class here, add <code>class="frame"</code> to the code:</p>
<pre>&lt;img class="frame" src="http://YOUR_DOMAIN.com/IMAGE_FILENAME.png" alt="" /&gt;</pre>
<p>To apply a custom class, add <code>class="framed-image"</code> like so:</p>
<pre>&lt;img class="framed-image" src="http://YOUR_DOMAIN.com/IMAGE_FILENAME.png" alt="" /&gt;</pre>
<p>That&#8217;s all there is to it!</p>
<p>In the end, adding a class to apply one or more &#8220;picture frames&#8221; to your images on a one-by-one basis provides a flexible, simple way to make the most of the images used in your site&#8217;s posts and pages.</p>
]]></content:encoded>
			<wfw:commentRss>http://diythemes.com/thesis/rtfm/how-to-add-frames-images-wp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

