<?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>Greg Rickaby &#187; Thesis Tutorials</title>
	<atom:link href="http://gregrickaby.com/category/tutorials/feed" rel="self" type="application/rss+xml" />
	<link>http://gregrickaby.com</link>
	<description>Power WordPress user; Thesis, Genesis, and Headway Developer</description>
	<lastBuildDate>Sat, 07 Aug 2010 19:19:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How To: Roll your own News Ticker with YQL, XML, and jQuery</title>
		<link>http://gregrickaby.com/2010/07/roll-your-own-news-ticker-with-jquery-and-yql.html</link>
		<comments>http://gregrickaby.com/2010/07/roll-your-own-news-ticker-with-jquery-and-yql.html#comments</comments>
		<pubDate>Fri, 23 Jul 2010 18:50:01 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=4214</guid>
		<description><![CDATA[The boss wanted me to find a news ticker to put on the homepage of our community portal, buzzmontgomery.com. So the search was on to find a &#8220;widget&#8221; from Fox News and CNN. No luck, well, no luck in the sense that their &#8220;widgets&#8221; didn&#8217;t fit my needs &#8211; in particular I needed something 930 [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F07%2Froll-your-own-news-ticker-with-jquery-and-yql.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F07%2Froll-your-own-news-ticker-with-jquery-and-yql.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p>The boss wanted me to find a news ticker to put on the homepage of our community portal, <a href="http://www.buzzmontgomery.com" target="_blank">buzzmontgomery.com</a>.</p>
<p>So the search was on to find a &#8220;widget&#8221; from Fox News and CNN. No luck, well, no luck in the sense that their &#8220;widgets&#8221; didn&#8217;t fit my needs &#8211; in particular I needed something 930 pixels wide and 40 pixels tall.</p>
<p>So, I decided to teach myself how to use <a href="http://developer.yahoo.com/yql/" target="_blank">YQL</a> (Yahoo! Query Language), so I could have access to &#8220;the worlds&#8221; database.</p>
<p><strong>Here are some quick facts:</strong></p>
<ul>
<li>YQL is huge, it powers mega-sites/platforms like Zillow and Yelp</li>
<li>The <a href="http://datatables.org/" target="_blank">Open Data Tables</a> is made up of thousands of web sites sharing their data</li>
<li>YQL has the ability to export this data into both XML and JSON</li>
<li>PHP5 has a <a href="http://php.net/manual/en/book.simplexml.php" target="_blank">SimpleXML</a> parser built in</li>
</ul>
<p>With this knowledge I put my head down and started coding. Here I&#8217;ll show you how to create your own &#8220;ticker&#8221; using SimpleXML, YQL, jQuery, and CSS.</p>
<p><span id="more-4214"></span></p>
<h2>Step 1: Finding the data</h2>
<p>We need to visit the <a href="http://developer.yahoo.com/yql/console/" target="_blank">YQL Console</a> and <a href="http://y.ahoo.it/MYIXEfWl" target="_blank">run a query</a> using a statement. For demonstration purposes, I&#8217;ll run a query to <em>select the titles and links from an RSS feed</em>.</p>
<p><code>select title,link from rss where url="http://rss.news.yahoo.com/rss/topstories"</code></p>
<div id="attachment_4218" class="wp-caption aligncenter" style="width: 480px">
	<img class="size-medium wp-image-4218" title="yql-0" src="http://gregrickaby.com/wp-content/uploads/2010/07/yql-0-480x107.png" alt="" width="480" height="107" />
	<p class="wp-caption-text">The console</p>
</div>
<p>Un-check, &#8220;Diagnostics&#8221; and push &#8220;Test&#8221;.</p>
<div id="attachment_4215" class="wp-caption aligncenter" style="width: 480px">
	<img class="size-medium wp-image-4215" title="yql-1" src="http://gregrickaby.com/wp-content/uploads/2010/07/yql-1-480x74.png" alt="" width="480" height="74" />
	<p class="wp-caption-text">After running the query, here is the URL we&#39;ll use in a minute</p>
</div>
<p>The result is a URL (aka REST query) we can use in our code (more on that in a second).</p>
<p><strong>What just happened?</strong> Running this query will render an <em>XML v1.0 formatted file via  URL</em> &#8211; no downloading, plus it&#8217;s totally dynamic and auto-updates the contents based on the RSS feed. (amazing huh?)</p>
<div id="attachment_4216" class="wp-caption aligncenter" style="width: 480px">
	<img class="size-medium wp-image-4216" title="yql-2" src="http://gregrickaby.com/wp-content/uploads/2010/07/yql-2-480x218.png" alt="" width="480" height="218" />
	<p class="wp-caption-text">The results in XML format</p>
</div>
<h2>Step 2: Grab the data</h2>
<p>This is easy since PHP 5+ has a built in xml reader, called SimpleXML. If you look at the code below you&#8217;ll see:</p>
<p><code><strong>$requestAddress</strong> = "http://query.yahooapis.com/v1/public/yql?q=select%20title%2Clink%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22";</code></p>
<p>This is URL that the YQL Console gave us as a result of our query. (You can run ANY QUERY you&#8217;d like. YQL has many sample queries to try on your own.)</p>
<p>This function below does a few things:</p>
<ul>
<li>Grabs XML</li>
<li>Reads the content</li>
<li>Parses the XML and turns it into a PHP variable</li>
<li>Displays the content in a Loop</li>
</ul>
<p>Add this to <strong>custom_functions.php</strong></p>
<pre>function news_ticker_html() {
// Grab XML
$requestAddress = "http://query.yahooapis.com/v1/public/yql?q=select%20title%2Clink%20from%20rss%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22";
// Read content
$xml_str = file_get_contents($requestAddress,0);
// Create variable
$xml = new SimplexmlElement($xml_str);
// Start displaying content
echo "&lt;div id='news_ticker'&gt;&lt;ul id='ticker'&gt;";
// Begin Loop
foreach ($xml-&gt;results-&gt;item as $items)
 {
 echo "&lt;li&gt;&lt;a href=".$items-&gt;link[0]."&gt;".$items-&gt;title[0]."&lt;/a&gt;&lt;/li&gt;";
 }
// End Loop
echo "&lt;/ul&gt;&lt;/div&gt;";
}
// Add to hook
add_action('thesis_hook_before_content', 'news_ticker_html');</pre>
<p>What makes XML so cool when mixed with PHP is how easy it is to read and parse thanks to XML tags. Here is a great tutorial on <a href="http://www.hiteshagrawal.com/php/php5-tutorial-parsing-xml-in-php5-using-simplexml" target="_blank">parsing xml with PHP5.</a></p>
<div id="attachment_4223" class="wp-caption aligncenter" style="width: 480px">
	<a href="http://gregrickaby.com/wp-content/uploads/2010/07/yql-3.png"><img class="size-medium wp-image-4223" title="yql-3" src="http://gregrickaby.com/wp-content/uploads/2010/07/yql-3-480x120.png" alt="" width="480" height="120" /></a>
	<p class="wp-caption-text">Each one of these &lt;results&gt;&lt;item&gt;&lt;link&gt;&lt;title&gt; is a tag, which are easily extracted</p>
</div>
<h2>Step 3: Install the jQuery</h2>
<p><strong>liScroll</strong> is a <em>very simple</em>, lightweight  jQuery script which will take our parsed data and bring it to life. Visit <a href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html?utm_source=gregrickaby.com" target="_blank">liScroll</a> to <a href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/jquery.li-scroller.1.0.js" target="_blank">download</a> the script and to see more options.</p>
<p>Add this to <strong>custom_functions.php</strong></p>
<pre>function footer_scripts_html() {
&lt;script type="text/javascript" src="http://yourwebsite.com/ticker-scroller.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
<code>   $(function(){ $("ul#ticker").liScroll(); });
&lt;/script&gt;
&lt;?php }
add_action('thesis_hook_after_html', 'footer_scripts_html');
</code></pre>
<h2>Step 4: Install the CSS</h2>
<p>Add this to your <strong>custom.css</strong></p>
<pre>#news_ticker{display:block;height:41px;width:931px;overflow:hidden;}
.tickercontainer{border:1px solid #000;background:#fff;width:929px;height:27px;overflow:hidden;margin:0;padding:0;}
.tickercontainer .mask{position:relative;left:10px;top:8px;width:900px;overflow:hidden;}
ul.newsticker{position:relative;left:900px;font:bold 10px Verdana;list-style-type:none;margin:0;padding:0;}
ul.newsticker li{float:left;background:#fff;margin:0;padding:0;}
ul.newsticker a{white-space:nowrap;color:red;font:bold 10px Verdana;margin:0 50px 0 0;padding:0;}
ul.newsticker span{margin:0 10px 0 0;}</pre>
<p><strong>The result:</strong></p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/yql-4.png"><img class="size-full wp-image-4225 alignleft" title="yql-4" src="http://gregrickaby.com/wp-content/uploads/2010/07/yql-4.png" alt="" width="690" height="26" /></a></p>
<p><a href="http://www.buzzmontgomery.com" target="_blank">See it in action</a></p>
<p>This is just the tip of the ice burg. By learning how to grab, parse, and display XML data from YQL &#8211; you are only limited to the crazy amount of data in the YQL Open Tables Database. Have fun and good luck!</p>
<p><em><strong>PS</strong> &#8211; this only works if your server is running PHP5!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/07/roll-your-own-news-ticker-with-jquery-and-yql.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add an anchor to NextGEN Gallery Image Browser and increase your page-views by 100x</title>
		<link>http://gregrickaby.com/2010/07/add-an-anchor-to-nextgen-gallery-image-browser.html</link>
		<comments>http://gregrickaby.com/2010/07/add-an-anchor-to-nextgen-gallery-image-browser.html#comments</comments>
		<pubDate>Mon, 12 Jul 2010 14:22:31 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=4060</guid>
		<description><![CDATA[NextGEN Gallery Users: If you use Image Browser option to show your image galleries (and I highly recommend it over Effects, Lightbox and Cooliris &#8211; more on that in a minute) then you are forcing your users scroll down to navigate to the next image. Here is a quick and dirty way to completely eliminate [...]]]></description>
			<content:encoded><![CDATA[<p></p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F07%2Fadd-an-anchor-to-nextgen-gallery-image-browser.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F07%2Fadd-an-anchor-to-nextgen-gallery-image-browser.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-1.png"><img class="alignright size-full wp-image-4061" title="anchor-text-1" src="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-1.png" alt="" width="157" height="159" /></a>NextGEN Gallery Users: If you use <a href="http://www.buzzmontgomery.com/blog/2010/07/photos-jimmy-buffett-in-gulf-shores/" target="_blank">Image Browser</a> option to show your image galleries (and I highly recommend it over Effects, Lightbox and Cooliris &#8211; more on that in a minute) then you are forcing your users scroll down to navigate to the next image.</p>
<p>Here is a quick and dirty way to completely eliminate scrolling. Not only will this help the user experience, it will also help increase your page-views. We&#8217;re going to give the Image Browser some anchor text &#8211; and move the navigation to the top.</p>
<p><span id="more-4060"></span></p>
<p><strong>Get to the plug-in editor:</strong></p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-2.png"><img class="alignright size-thumbnail  wp-image-4062" title="anchor-text-2" src="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-2-150x150.png" alt="" width="150" height="150" /></a>WP-Dashboard, click on &#8220;Plugins&#8221; and &#8220;Editor&#8221;</p>
<p>In the top right corner, there is a drop-down box. Choose &#8220;NextGEN Gallery&#8221; and click &#8220;Select&#8221;.</p>
<p><strong>Scroll baby, scroll</strong></p>
<p>NextGEN is a HUGE plug-in. However, it is also one of the most useful, and it&#8217;s the reason I switched to WordPress from Joomla.Scroll down until you see:</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-3.png"><img class="alignright size-thumbnail  wp-image-4063" title="anchor-text-3" src="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-3-150x150.png" alt="" width="150" height="150" /></a><code>nextgen-gallery/view/imagebrowser.php</code></p>
<p><strong>Copy and Paste please.</strong></p>
<p>Now, copy the code below and paste it into the plugin editor, overwriting everything:</p>
<pre>&lt;?php
/**
Template Page for the image browser

Follow variables are useable :

 $image : Contain all about the image
 $meta  : Contain the raw Meta data from the image
 $exif  : Contain the clean up Exif data
 $iptc  : Contain the clean up IPTC data
 $xmp   : Contain the clean up XMP data 

 You can check the content when you insert the tag &lt;?php var_dump($variable) ?&gt;
 If you would like to show the timestamp of the image ,you can use &lt;?php echo $exif['created_timestamp'] ?&gt;
**/
?&gt;
&lt;?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?&gt;&lt;?php if (!empty ($image)) : ?&gt;

&lt;div id="&lt;?php echo $image-&gt;anchor ?&gt;"&gt;
 &lt;div&gt;
 &lt;div&gt;
 &lt;a id="ngg-prev-&lt;?php echo $image-&gt;previous_pid ?&gt;" href="&lt;?php echo $image-&gt;previous_image_link ?&gt;#anchor"&gt;&amp;#9668; &lt;?php _e('Back', 'nggallery') ?&gt;&lt;/a&gt;
 &lt;/div&gt;
 &lt;div&gt;
 &lt;a id="ngg-next-&lt;?php echo $image-&gt;next_pid ?&gt;" href="&lt;?php echo $image-&gt;next_image_link ?&gt;#anchor"&gt;&lt;?php _e('Next', 'nggallery') ?&gt; &amp;#9658;&lt;/a&gt;
 &lt;/div&gt;
 &lt;div&gt;&lt;a name="anchor"&gt;&lt;?php _e('Picture', 'nggallery') ?&gt; &lt;?php echo $image-&gt;number ?&gt; &lt;?php _e('of', 'nggallery')?&gt; &lt;?php echo $image-&gt;total ?&gt;&lt;/div&gt;
 &lt;div&gt;&lt;p&gt;&lt;?php echo $image-&gt;description ?&gt;&lt;/p&gt;&lt;/div&gt;
 &lt;/div&gt;    

 &lt;div&gt;&lt;?php echo $image-&gt;href_link ?&gt;&lt;/div&gt;
 &lt;h3&gt;&lt;?php echo $image-&gt;alttext ?&gt;&lt;/h3&gt;

&lt;/div&gt;    

&lt;?php endif; ?&gt;</pre>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-7.png"><img class="alignnone size-medium wp-image-4093" title="anchor-text-7" src="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-7-480x285.png" alt="" width="480" height="285" /></a></p>
<p>Click &#8220;Update File&#8221;. Now the Image Browser looks like this:<br />
<a href="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-5.jpg"></a></p>
<p><a href="http://www.buzzmontgomery.com/nggallery/post/photos-jimmy-buffett-in-gulf-shores/image/2922/#anchor" target="_blank"><img class="alignnone size-medium wp-image-4065" title="anchor-text-5" src="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-5-480x409.jpg" alt="" width="480" height="409" /></a></p>
<p>Navigation on top! When your users click &#8220;Next&#8221; or &#8220;Back&#8221; the page will change, but the navigation remains constant thanks to the 1995 HTML snippet: Anchor. Now the user&#8217;s mouse will always be on &#8220;Next&#8221; or &#8220;Back&#8221; at each click. Making your user very happy (and clicky) and your website stats climb.</p>
<p><strong>Why I recommend Image Browser instead of  Effects (Flash) Gallery, Lightbox (jQuery), or Cooliris (software)<br />
</strong></p>
<p>When you run a website that has advertisements, then you know about terms like &#8220;page-views&#8221; and &#8220;impressions&#8221;. Advertisers want to know: <strong>A)</strong> How many page-views does your website get? <strong>B)</strong> What is your CPM? The higher your page-views, the more you raise your CPM. Not only are image galleries great content for your users, they are a real easy way to increase page-views.</p>
<p>When you use Effects, Lightbox, or Cooliris instead of Image Browser, you&#8217;re taking away the ability to increase page-views since the image will be served by Flash, jQuery, or software.</p>
<p>What if someone&#8217;s on a mobile phone? They couldn&#8217;t see your images. What if someone had Java turned off? Do you really want to add additional  jQuery to your website? What if that user didn&#8217;t have the Cooliris plug-in or software? Shutting the user out of unique content is web no-no #1.</p>
<p>Sure, those effects are modern and pretty. But they won&#8217;t help your cause &#8211; if your cause is to give your users an easy, enjoyable image gallery experience on any browser or platform.</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/anchor-text-6.png" target="_blank">Check out my NextGEN gallery settings</a> (.png, new window)</p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/07/add-an-anchor-to-nextgen-gallery-image-browser.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Thesis 1.8 Header Image</title>
		<link>http://gregrickaby.com/2010/07/thesis-1-8-header-image.html</link>
		<comments>http://gregrickaby.com/2010/07/thesis-1-8-header-image.html#comments</comments>
		<pubDate>Sat, 10 Jul 2010 13:40:37 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=4040</guid>
		<description><![CDATA[What&#8217;s great about this is how easy it&#8217;s going to be for your clients to update their header image. Obviously! Here&#8217;s how it works: You&#8217;ll notice the &#8220;Header Image&#8221; under the Thesis menu in your WordPress Dashboard. Just click on it &#8211; and it will take you to the upload page. Thesis will tell you [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://gregrickaby.com/2010/07/thesis-1-8-header-image.html" title="Permanent link to Thesis 1.8 Header Image"><img class="post_image alignnone" src="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image.jpg" width="695" height="236" alt="Post image for Thesis 1.8 Header Image" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F07%2Fthesis-1-8-header-image.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F07%2Fthesis-1-8-header-image.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image-1.png"><img class="alignright size-full  wp-image-4044" title="thesis-header-image-1" src="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image-1.png" alt="" width="157" height="156" /></a>What&#8217;s great about this is how easy it&#8217;s going to be for your clients to update their header image. Obviously! Here&#8217;s how it works:</p>
<p>You&#8217;ll notice the &#8220;Header Image&#8221; under the Thesis menu in your WordPress Dashboard. Just click on it &#8211; and it will take you to the upload page. Thesis will tell you an optimal width. In my case it was <em>952 pixels</em>. If the image is larger than specified &#8211; Thesis <strong>WILL</strong> crop it to fit &#8211; although, the image quality will suffer after the cropping software beats it up. It&#8217;s best just to make it the right width in Photoshop first.</p>
<p><span id="more-4040"></span></p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image-2.png"><img class="alignnone size-medium wp-image-4045" title="thesis-header-image-2" src="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image-2-480x191.png" alt="" width="480" height="191" /></a></p>
<p>Just click &#8220;Browse&#8221; and &#8220;Upload&#8221;</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image-3.jpg"><img class="alignnone size-medium wp-image-4046" title="thesis-header-image-3" src="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image-3-480x252.jpg" alt="" width="480" height="252" /></a></p>
<p>Now wasn&#8217;t that easy? Removing the image is even easier. Hover over the image, and click &#8220;Remove Image&#8221;.</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image-4.jpg"><img class="alignnone size-medium wp-image-4047" title="thesis-header-image-4" src="http://gregrickaby.com/wp-content/uploads/2010/07/thesis-header-image-4-480x252.jpg" alt="" width="480" height="252" /></a></p>
<p><strong>You don&#8217;t have to have an image as wide as your site! </strong>You can upload a smaller image, say, a logo and it will align-left in the header.</p>
<p>The CSS output is as follows:</p>
<pre><code>/*---:[ wp custom header image ]:---*/
#header { height: 12.9em; padding: 0; background-image: url('http://gregrickaby.com/wp-content/uploads/2010/07/cropped-awesome-header-image.jpg'); background-repeat: no-repeat; background-size: 85.2em 12.9em; }
#logo a { display: block; width: 23.667em; height: 3.583em; text-indent: -9999px; outline: none; }
</code></pre>
<p>The image upload object puts the image in <code>/wp-content/uploads/</code> and then writes it into <code>layout.css</code></p>
<p>Easy. And about time!</p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/07/thesis-1-8-header-image.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: Use jQuery Lazy Load in Thesis 1.7</title>
		<link>http://gregrickaby.com/2010/04/how-to-use-jquery-lazy-load-in-thesis-1-7.html</link>
		<comments>http://gregrickaby.com/2010/04/how-to-use-jquery-lazy-load-in-thesis-1-7.html#comments</comments>
		<pubDate>Wed, 28 Apr 2010 00:49:44 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=3862</guid>
		<description><![CDATA[Maybe you’ve seen the “fade-in” effect of the content and images loading as you scroll down on some popular sites (most notably mashable.com) that effect is called “Lazy Load” and I’ll show you to roll it out in under five minutes.]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://gregrickaby.com/2010/04/how-to-use-jquery-lazy-load-in-thesis-1-7.html" title="Permanent link to How To: Use jQuery Lazy Load in Thesis 1.7"><img class="post_image alignnone" src="http://gregrickaby.com/wp-content/uploads/2010/04/lazy-load-jquery-fun.jpg" width="680" height="250" alt="Post image for How To: Use jQuery Lazy Load in Thesis 1.7" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F04%2Fhow-to-use-jquery-lazy-load-in-thesis-1-7.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F04%2Fhow-to-use-jquery-lazy-load-in-thesis-1-7.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p>Maybe you&#8217;ve seen the &#8220;fade-in&#8221; effect of the content and images loading as you scroll down on some popular sites (most notably <a href="http://mashable.com" target="_blank">mashable.com</a>) that effect is called &#8220;Lazy Load&#8221; and I&#8217;ll show you to roll it out in under five minutes.</p>
<p>Before we get started, you have download the jQuery and Placeholder image (right-click &#8220;save as&#8221;)</p>
<p style="text-align: center;"><a href="http://www.appelsiini.net/download/jquery.lazyload.mini.js" target="_blank">jQuery Lazy Load (minified)</a> | <a href="http://gregrickaby.com/wp-content/uploads/scripts/lazyload.gif" target="_blank">Lazyload.gif</a></p>
<p>Now you have to upload those two files. Upload them to <code>/wp-content/uploads/scripts/</code></p>
<p><strong>Step 1: </strong>Insert the following into custom_functions.php</p>
<pre>function lazy_load_html() {
?&gt;
&lt;script src="/wp-content/uploads/scripts/jquery.lazyload.mini.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
jQuery(document).ready(function($){
 if (navigator.platform == "iPad") return;
 $("img").lazyload({
 placeholder : "/wp-content/uploads/scripts/lazyload.gif",
 effect : "fadeIn"
 });
});
&lt;/script&gt;
&lt;?php }
add_action('thesis_hook_after_html','lazy_load_html');</pre>
<p><strong>Step 2 (optional): </strong>Turn on the jQuery library in Thesis Options &#8211;&gt; Design Options &#8211;&gt; JavaScript</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/04/lazy-load-thesis.png"><img class="aligncenter size-medium wp-image-3863" title="Lazy Load Thesis" src="http://gregrickaby.com/wp-content/uploads/2010/04/lazy-load-thesis-272x480.png" alt="Lazy Load Thesis" width="272" height="480" /></a></p>
<p><strong>Why is this optional?</strong> Because you may already have the jQuery library running. To check, you should view your source-code and look for something similar to this:</p>
<pre id="line84">&lt;script type="text/javascript" src="<a href="view-source:http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js</a>"&gt;&lt;/script&gt;
</pre>
<p>If you see this, then a plug-in has already loaded jQuery and there is no need to load it twice. (this is the reason 99% plug-ins conflict with each other and break)</p>
<p><strong>Step 3:</strong> There is no step three. It was that easy. Enjoy!</p>
<p>For more information, check out the official website: <a href="http://www.appelsiini.net/projects/lazyload" target="_blank">Lazy Load Plug-in for jQuery</a> andw00t for one less plug-in you have to install!</p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/04/how-to-use-jquery-lazy-load-in-thesis-1-7.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How To: Take Advantage of Twitter&#8217;s @Anywhere</title>
		<link>http://gregrickaby.com/2010/04/how-to-take-advantage-of-twitters-anywhere.html</link>
		<comments>http://gregrickaby.com/2010/04/how-to-take-advantage-of-twitters-anywhere.html#comments</comments>
		<pubDate>Mon, 19 Apr 2010 19:06:43 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=3684</guid>
		<description><![CDATA[What is Twitter’s @Anywhere? In-short, a quick way to bring the power of Twitter’s API by use of Hovercards, Follow Me Badges, and Tweet Boxes to YOUR site. I’ll show you how to take advantage of some of the features – WITHOUT using a plug-in.]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://gregrickaby.com/2010/04/how-to-take-advantage-of-twitters-anywhere.html" title="Permanent link to How To: Take Advantage of Twitter&#8217;s @Anywhere"><img class="post_image alignnone" src="http://gregrickaby.com/wp-content/uploads/2010/04/twitter-a-anywhere.jpg" width="680" height="250" alt="Post image for How To: Take Advantage of Twitter&#8217;s @Anywhere" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F04%2Fhow-to-take-advantage-of-twitters-anywhere.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F04%2Fhow-to-take-advantage-of-twitters-anywhere.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p>First, I want to thank @Matt425 for his tutorial on how to invoke the <a href="http://mattflies.com/tech/how-to-install-twitters-anywhere-on-thesis/" target="_blank">Follow Me Badge</a>. It wasn&#8217;t until after I followed his tutorial that I started to see further <em>kick-ass-ness</em> on my site. <img src='http://gregrickaby.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>What is Twitter&#8217;s @Anywhere? In-short, a quick way to bring the power of Twitter&#8217;s API by use of <strong>Hovercards</strong>, <strong>Follow Me Badges</strong>, and <strong>Tweet Boxes</strong> to YOUR site. I&#8217;ll show you how to take advantage of some of the features &#8211; <em>WITHOUT</em> using a plug-in.</p>
<h2>Step #1 &#8211; Create your own &#8220;Application&#8221; (in other words, authorize your Twitter account for @Anywhere usage)</h2>
<p>a. <a href="http://dev.twitter.com/apps/new" target="_blank">http://dev.twitter.com/apps/new</a></p>
<p>b. fill out the info &amp; hit &#8220;save&#8221;</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/04/twitter-app-1.jpg" target="_blank"><img class="aligncenter size-medium wp-image-3685" title="twitter-app-1" src="http://gregrickaby.com/wp-content/uploads/2010/04/twitter-app-1-480x389.jpg" alt="" width="480" height="389" /></a></p>
<p>c. copy the code (replacing the XXXXxxxxXXXXXxxxxXXXX with your own API)</p>
<pre><code>
&lt;script src="http://platform.twitter.com/anywhere.js?id=XXXXxxxxXXXXXxxxxXXXX&amp;v=1"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
     twttr.anywhere(function(twitter) {
              twitter.hovercards();
     });
  &lt;/script&gt;</code></pre>
<h2>Step #2 &#8211; Work the code into your site</h2>
<p>There are two ways 1) Easy 2) Ninja</p>
<p><em>EASY:</em> Paste the code into WP-Dashboard -&gt; Thesis -&gt; Site Options -&gt; Stats Software/Scripts -&gt; Hit Save</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/04/twitter-app-2.jpg" target="_blank"><img class="aligncenter size-medium wp-image-3686" title="twitter-app-2" src="http://gregrickaby.com/wp-content/uploads/2010/04/twitter-app-2-480x326.jpg" alt="" width="480" height="326" /></a></p>
<p><em>NINJA:</em> Using custom_functions.php we&#8217;re going to use a function to invoke the code<em><br />
</em></p>
<p>a.) Open custom_functions.php</p>
<p>b.) Copy the code below and paste near the bottom:</p>
<pre>//Twitter @Anywhere
function twitter_anywhere_html() {
?&gt;
&lt;script src="http://platform.twitter.com/anywhere.js?id=XXXXxxxxXXXXXxxxxXXXX&amp;v=1"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
     twttr.anywhere(function(twitter) {
              twitter.hovercards();
     });
  &lt;/script&gt;
&lt;?php }
add_action('thesis_hook_after_html','twitter_anywhere_html');</pre>
<p>So what now? Now you&#8217;ve just merged Twitter&#8217;s API with your website, thus activating the &#8220;Hovercard&#8221; feature!</p>
<p>I&#8217;m going to type a Twitter user-name, let&#8217;s use @pearsonified and WITHOUT using HTML and a Twitter Hovercard will display!</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/04/twitter-app-3.jpg" target="_blank"><img class="aligncenter size-medium wp-image-3687" title="twitter-app-3" src="http://gregrickaby.com/wp-content/uploads/2010/04/twitter-app-3-480x326.jpg" alt="" width="480" height="326" /></a></p>
<h2>Advanced Features</h2>
<p><strong>Want to show a Follow Me Badge?</strong> Replace the code directly above with this:</p>
<pre>//Twitter @Anywhere
function twitter_anywhere_html() {
?&gt;
&lt;script src="http://platform.twitter.com/anywhere.js?id=XXXXxxxxXXXXXxxxxXXXX&amp;v=1"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
     twttr.anywhere(function(twitter) {
              twitter.hovercards();
              twitter('#follow-yourusername').followButton("yourusername");
     });
  &lt;/script&gt;
&lt;?php }
add_action('thesis_hook_after_html','twitter_anywhere_html');</pre>
<p>Paste this code anywhere in your content/sidebars:</p>
<pre>&lt;div id="follow-yourusername"&gt;&lt;/div&gt;</pre>
<p>Will display: <a href="http://gregrickaby.com/wp-content/uploads/2010/04/follow-button.png"><img class="size-full wp-image-3880 alignnone" title="follow-button" src="http://gregrickaby.com/wp-content/uploads/2010/04/follow-button.png" alt="" width="186" height="32" /></a></p>
<p><strong>How about a Tweet Box?</strong> Replace code directly above with this:</p>
<pre>//Twitter @Anywhere
function twitter_anywhere_html() {
?&gt;
&lt;script src="http://platform.twitter.com/anywhere.js?id=XXXXxxxxXXXXXxxxxXXXX&amp;v=1"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    twttr.anywhere(function(twitter) {
              twitter.hovercards();
              twitter('#follow-yourusername').followButton("yourusername");
 });
   twttr.anywhere(function (T) {
              T("#tbox").tweetBox({
              height: 100,
              width: 400,
              defaultContent: "@gregrickaby"
              });
 });
  &lt;/script&gt;
&lt;?php }
add_action('thesis_hook_after_html','twitter_anywhere_html');</pre>
<p>Paste this code anywhere in your content/sidebars:</p>
<pre>&lt;div id="tbox"&gt;&lt;/div&gt;</pre>
<p>Will display:</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/04/tweet-box.png"><img class="aligncenter size-full wp-image-3877" title="tweet-box" src="http://gregrickaby.com/wp-content/uploads/2010/04/tweet-box.png" alt="" width="435" height="195" /></a></p>
<p>Let&#8217;s review. All we&#8217;ve done is call a Javascript and then activate said Java using a &lt;div&gt;. Easy stuff, and you&#8217;ll be able to give your viewers another way to interact with you. Check out Twitter&#8217;s <a href="http://dev.twitter.com/anywhere/begin" target="_blank">Beginners Guide</a> to @Anywhere!</p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/04/how-to-take-advantage-of-twitters-anywhere.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To: Add More Sidebars</title>
		<link>http://gregrickaby.com/2010/04/how-to-add-more-thesis-sidebars.html</link>
		<comments>http://gregrickaby.com/2010/04/how-to-add-more-thesis-sidebars.html#comments</comments>
		<pubDate>Sun, 18 Apr 2010 19:52:41 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=3653</guid>
		<description><![CDATA[Adding more widget spaces in Thesis (or any Wordpress theme) is REALLY easy! It’s only three steps, and I’ll show you how to add three (3) additional widgets to your footer.]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://gregrickaby.com/2010/04/how-to-add-more-thesis-sidebars.html" title="Permanent link to How To: Add More Sidebars"><img class="post_image alignnone" src="http://gregrickaby.com/wp-content/uploads/2010/04/create-additional-widgets.jpg" width="680" height="250" alt="How To: Create Additional Widgets" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F04%2Fhow-to-add-more-thesis-sidebars.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F04%2Fhow-to-add-more-thesis-sidebars.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p>Adding more sidebars in Thesis (or any WordPress theme) is REALLY easy! It&#8217;s only three steps, and I&#8217;ll show you how to create 3 additional widgets to your footer.</p>
<p><strong>Step #1: Insert the following code into custom_functions.php near the top</strong></p>
<pre><code>register_sidebar(array('name'=&gt;'Footer Column 1', 'before_title'=&gt;'&lt;h3&gt;', 'after_title'=&gt;'&lt;/h3&gt;'));
register_sidebar(array('name'=&gt;'Footer Column 2', 'before_title'=&gt;'&lt;h3&gt;', 'after_title'=&gt;'&lt;/h3&gt;'));
register_sidebar(array('name'=&gt;'Footer Column 3', 'before_title'=&gt;'&lt;h3&gt;', 'after_title'=&gt;'&lt;/h3&gt;'));
</code></pre>
<p>This code simply tells WordPress to &#8220;add a new widget space&#8221;.</p>
<div class="hint">Hint: You can change the name of the sidebar to meet your needs. Simply replace &#8220;Footer Column 1&#8243; to whatever you&#8217;d like.</div>
<p><strong>Step #2: Insert the following code into custom_functions.php near the bottom</strong></p>
<pre>// Footer Widgets
function footer_widgets_html() {
?&gt;
 &lt;div id="custom_footer"&gt;
 &lt;div class="column1"&gt;
 &lt;ul&gt;
 &lt;?php    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer Column 1') ){    ?&gt;&lt;?php    }    ?&gt;
 &lt;/ul&gt;
 &lt;/div&gt;
 &lt;div class="column2"&gt;
 &lt;ul&gt;
 &lt;?php    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer Column 2') ){    ?&gt;&lt;?php    }    ?&gt;
 &lt;/ul&gt;
 &lt;/div&gt;
 &lt;div class="column3"&gt;
 &lt;ul&gt;
 &lt;?php    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer Column 3') ){    ?&gt;&lt;?php    }    ?&gt;
 &lt;/ul&gt;
 &lt;/div&gt;
 &lt;/div&gt;
&lt;?php }
add_action('thesis_hook_after_footer','footer_widgets_html');
</pre>
<p>Here we&#8217;ve setup a Function to build 3 columns inside the Thesis Hook: After Footer. The PHP just checks to see if there is a Sidebar named &#8220;Footer Column 1&#8243;, if there is print it.</p>
<div class="hint">Hint: If you change the names of the Sidebars, you must change them here too!</div>
<p><strong>Step #3: Add the following code to custom.css</strong></p>
<pre>/* --- Footer Widgets --- */
#custom_footer { /* The parent DIV containing all 3 widgets */
 height: 350px;
 width: 100%;
 margin: 30px 0 0 0;
}
#custom_footer h3 { /* Headline color */
 height: 40px;
 font-size: 20px;
 color: #000;
}
#custom_footer a { /* Link color */
 color: #000;
}
#custom_footer ul li { /* Remove bullets */
 list-style: none;
}
.column1 {
 height: auto;
 width: 30%;
 margin: 0 0 0 15px;
 padding: 5px;
 float: left;
}
.column2 {
 float: left;
 height: auto;
 width: 30%;
 margin: 0 0 0 15px;
 padding: 5px;
 float: left;
}
.column3 {
 height: auto;
 width: 30%;
 margin: 0 0 0 15px;
 padding: 5px;
 float: left;
}
</pre>
<p>Here we just add some quick styling to line-up all 3 columns next to each other. The end result, while basic, gets you headed in the right direction</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/04/additional-widgets.jpg"><img class="aligncenter size-medium wp-image-3664" title="additional-widgets" src="http://gregrickaby.com/wp-content/uploads/2010/04/additional-widgets-480x230.jpg" alt="" width="480" height="230" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/04/how-to-add-more-thesis-sidebars.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: Create a Featured Content Slider</title>
		<link>http://gregrickaby.com/2010/04/how-to-create-a-featured-content-slider.html</link>
		<comments>http://gregrickaby.com/2010/04/how-to-create-a-featured-content-slider.html#comments</comments>
		<pubDate>Tue, 06 Apr 2010 14:43:14 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=3597</guid>
		<description><![CDATA[There are a stack of plug-ins out there which use a mess of Java and jQuery to do what you could do in 50 lines or less. Creating a Featured Content Slider is easy when you take advantage of a Sub-Loop, Template Tags, TimThumb, and a little bit of jQuery inside the Thesis Theme.]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://gregrickaby.com/2010/04/how-to-create-a-featured-content-slider.html" title="Permanent link to How To: Create a Featured Content Slider"><img class="post_image alignnone" src="http://gregrickaby.com/wp-content/uploads/2010/04/featured-content-slider.jpg" width="680" height="250" alt="How To: Create a Featured Content Slider" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F04%2Fhow-to-create-a-featured-content-slider.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F04%2Fhow-to-create-a-featured-content-slider.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p>There are a stack of plug-ins out there which use a mess of Java and jQuery to do what you could do in 50 lines or less. Creating a Featured Content Slider is easy when you take advantage of a <a href="http://gregrickaby.com/2010/03/how-to-create-a-sub-loop-in-thesis.html" target="_blank">Sub-Loop</a>, <a href="http://codex.wordpress.org/Template_Tags" target="_blank">Template Tags</a>, <a href="http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/" target="_blank">TimThumb</a>, and a little bit of <a href="http://jquery.malsup.com/cycle/" target="_blank">jQuery</a> inside the Thesis Theme.</p>
<p><strong>Here is all the code:</strong></p>
<p>custom.css</p>
<pre><code>
/* --- Featured Content Slider --- */
#slideshow {
 height: 250px;
 width: 660px;
 margin: 0 0 10px 0;
 overflow: hidden;
}
.nav {
 margin: 0;
}
#nav a {
 position: relative;
 top: 235px;
 left: 565px;
 color: #000;
 margin: 0;
 padding: 3px 5px;
 border: 1px solid #000;
 background: #FFF; /* sets the bg color of the nav box */
 text-decoration: none;
 z-index: 9999;
}
#nav a.activeSlide {
 background-color: #FD0000; /* sets the bg color of the nav box when active */
}
#nav a:focus {
 outline: none;
}
</code></pre>
<p>Anywhere in custom_functions.php</p>
<pre><code>
// Featured Content Slider jQuery
function fcs_scripts_html() {
?&gt;
&lt;script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.72.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(function() {
    $('#slideshow').before('&lt;div id="nav" class="nav"&gt;').cycle({
        fx:     'fade',
        speed:  '3000',
        timeout: '3000',
        pager:  '#nav',
        pause:   '0',
        fastOnEvent: '0',
        before: function() { if (window.console) console.log(this.src); }
    });
});
&lt;/script&gt;
&lt;?php }
add_action('thesis_hook_after_html','fcs_scripts_html');

// Image Grabber (Tim Thumb)
function grabImage() {
	global $post, $posts;
	$first_img = '';
	ob_start();
	ob_end_clean();
	$output = preg_match_all('/&lt;img.+src=[\'"]([^\'"]+)[\'"].*&gt;/i', $post-&gt;post_content, $matches);
	$first_img = $matches [1] [0];
	return $first_img;
}
</code></pre>
<p>Thesis Hook: Before Post (or anywhere you want the Featured Content Slider to show up)</p>
<pre><code>
&lt;div id="slideshow"&gt;
&lt;?php $sub_loop_1 = new WP_Query("cat=6&amp;showposts=5");
while ($sub_loop_1-&gt;have_posts()) : $sub_loop_1-&gt;the_post(); ?&gt;
	&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;img src="&lt;?php echo bloginfo('template_url'); ?&gt;/lib/scripts/thumb.php?src=&lt;?php echo grabImage(); ?&gt;&amp;amp;h=250&amp;amp;w=660&amp;amp;zc=1&amp;amp;q=75" alt="&lt;?php the_title(); ?&gt;" title="&lt;?php the_title(); ?&gt;" /&gt;&lt;/a&gt;
&lt;?php endwhile; ?&gt;
&lt;/div&gt;
</code></pre>
<p><strong>How to use it:</strong></p>
<ol>
<li>Place the CCS in custom.css</li>
<li>Place the jQuery &amp; PHP into custom_functions.php</li>
<li>Place the Slideshow code anywhere in your content, into any Thesis Hook (maybe thesis_hook_before_post), and even a <a href="http://gregrickaby.com/2010/01/how-to-create-a-custom-page-template.html" target="_blank">custom page template</a></li>
<li>Change (&#8220;cat=6&amp;showposts=5&#8243;); to match a Category ID and desired post count</li>
<li>Check &#8220;jQuery&#8221; in Thesis &#8211;&gt; Design Options &#8211;&gt; Javascript (<a href="http://gregrickaby.com/wp-content/uploads/2010/04/activate-jquery.gif" target="_blank">see image</a>)</li>
<li>Create a new post, upload/add at least one image 660&#215;250 pixels</li>
</ol>
<h2>Let&#8217;s get technical</h2>
<p>So far we&#8217;ve used 46 lines of code&#8230;pretty impressive considering the leading <a href="http://wordpress.org/extend/plugins/featured-content-gallery/" target="_blank">Featured Content Slider plug-in</a> is over 1,000 lines of code, weighs 684KB, and is only compatible up to WordPress 2.7.1! (Uhh, WordPress 3.0 is fixin&#8217; to come out!)</p>
<p>What I&#8217;ve done is really simple:</p>
<ul>
<li>Used CSS to style</li>
<li>Used <a href="http://jquery.malsup.com/cycle/" target="_blank">jQuery</a> to create the &#8220;effects&#8221;</li>
<li>Used a <a href="http://gregrickaby.com/2010/03/how-to-create-a-sub-loop-in-thesis.html" target="_blank">Sub-Loop</a> to grab the post data</li>
<li>Used <a href="http://codex.wordpress.org/Template_Tags" target="_blank">Template Tags</a> to print the post data</li>
<li>Used TimThumb (already included in Thesis) to optimize the images</li>
<li>Use PHP to pull the Image Path from the Post</li>
</ul>
<p>The sub-loop simply queries the database at your direction. You need to specify what category to pull from, which is simple, just change: (&#8220;cat=6&amp;showposts=5&#8243;); to whatever Category ID it is you want to feature. The template tags will populate the HTML for you.</p>
<p>The jQuery Cycle script has a huge range of options and effects. You can find them <a href="http://jquery.malsup.com/cycle/options.html" target="_blank">here</a></p>
<h2>How do you find the Category ID?</h2>
<p>WP Dashboard &#8211;&gt; Posts &#8211;&gt; Categories</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/04/locate-category-id.gif"><img class="aligncenter size-medium wp-image-3613" title="locate-category-id" src="http://gregrickaby.com/wp-content/uploads/2010/04/locate-category-id-480x294.gif" alt="" width="480" height="294" /></a></p>
<h2>The images don&#8217;t show up!?</h2>
<p>1. Make sure you uploaded and inserted an image at least 660x250px  wide!</p>
<p>2. It&#8217;s possible that TimThumb is a blacklisted on your  server. (Hostgator) Check with your server administrator to make sure  TimThumb is &#8220;white-listed&#8221;</p>
<p>3. Make sure you&#8217;ve <a href="http://gregrickaby.com/wp-content/uploads/2010/04/activate-jquery.gif" target="_blank">checked &#8220;jQuery&#8221;</a> in Thesis &#8211;&gt; Design Options &#8211;&gt; Javascript</p>
<h2><a href="http://gregrickaby.com/wp-content/uploads/2010/04/insert-image.gif"><img class="aligncenter size-medium wp-image-3614" title="insert-image" src="http://gregrickaby.com/wp-content/uploads/2010/04/insert-image-480x293.gif" alt="" width="480" height="293" /></a> Site Examples</h2>
<p><a href="http://979jamz.com" target="_blank">http://979jamz.com</a></p>
<p><a href="http://newstalk1079.com" target="_blank">http://newstalk1079.com</a></p>
<p><a href="http://kendallvandyk.com" target="_blank">http://kendallvandyk.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/04/how-to-create-a-featured-content-slider.html/feed</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>How To: Create a Sub-Loop in Thesis</title>
		<link>http://gregrickaby.com/2010/03/how-to-create-a-sub-loop-in-thesis.html</link>
		<comments>http://gregrickaby.com/2010/03/how-to-create-a-sub-loop-in-thesis.html#comments</comments>
		<pubDate>Tue, 02 Mar 2010 14:13:08 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>
		<category><![CDATA[Advanced Customization]]></category>
		<category><![CDATA[Thesis]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=3444</guid>
		<description><![CDATA[This is part 3 of a never-ending-series about advanced ninja Thesis coding. You can get up-to-speed by reading, How To: Create a Custom Page Template and How To: Create Additional Page Templates. The WordPress Loop You&#8217;ve read about The WordPress Loop in other tutorials in other Themes; how you can &#8220;add/subtract post meta-data, tags, etc&#8230;&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://gregrickaby.com/2010/03/how-to-create-a-sub-loop-in-thesis.html" title="Permanent link to How To: Create a Sub-Loop in Thesis"><img class="post_image alignnone" src="http://gregrickaby.com/wp-content/uploads/2010/03/custom-sub-loop.jpg" width="680" height="250" alt="Post image for How To: Create a Sub-Loop in Thesis" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F03%2Fhow-to-create-a-sub-loop-in-thesis.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F03%2Fhow-to-create-a-sub-loop-in-thesis.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/03/custom-sub-loop.jpg"><img class="aligncenter size-full wp-image-3546" title="custom-sub-loop" src="http://gregrickaby.com/wp-content/uploads/2010/03/custom-sub-loop.jpg" alt="" width="680" height="250" /></a></p>
<p>This is part 3 of a never-ending-series about advanced ninja Thesis coding. You can get up-to-speed by reading, <a href="http://gregrickaby.com/2010/01/how-to-create-a-custom-page-template.html">How To: Create a Custom Page Template</a> and <a href="http://gregrickaby.com/2010/02/how-to-create-additional-page-templates.html">How To: Create Additional Page Templates</a>.</p>
<h2>The WordPress Loop</h2>
<p>You&#8217;ve read about <em>The WordPress Loop</em> in other tutorials in other Themes; how you can &#8220;add/subtract post meta-data, tags, etc&#8230;&#8221; all you have to do is &#8220;edit ____ in the WordPress Loop&#8221; blah blah blah.</p>
<p>Not with Thesis you can&#8217;t.</p>
<p><strong>Rule #1</strong>, never edit core Thesis files. It&#8217;s not that you&#8217;ll break Thesis, but you will however, take away one of the biggest selling points: &#8220;Thesis is future proof&#8221;. Alas, we still have our secret Thesis weapons:</p>
<p>custom.css? Check.<br />
custom_functions.php? Check.<br />
Custom Page Templates? Check.<br />
Greg Rickaby&#8217;s awesome tutorials? Check.</p>
<h2>The Everyday Scenario</h2>
<p>Client XYZ want&#8217;s to feature one category of posts on the homepage. The problem is, the client also wants a jQuery slider and no sidebars. Easy enough, just create a <a href="http://gregrickaby.com/2010/01/how-to-create-a-custom-page-template.html">Custom Page Template</a> and then create a custom sub-loop in home.php. (For a great example, check out this conversion I did using a custom sub-loop. Look at the &#8220;News&#8221; box on <a href="http://kendallvandyk.com/" target="_blank">the homepage</a>).</p>
<h2>The Query</h2>
<p>Once you&#8217;ve created home.php and attached it to Thesis, we need to do three things to make this all work:</p>
<ol>
<li>Specify a category</li>
<li>Query the database</li>
<li>Print the post data</li>
</ol>
<pre><code>&lt;?php
$sub_loop_1 = new WP_Query("cat=1&amp;showposts=3");
while ($sub_loop_1-&gt;have_posts()) : $sub_loop_1-&gt;the_post();
$category_link = get_category_link('1');
?&gt;</code></pre>
<p>In the code above, I said<em> &#8220;Hello database, I&#8217;d like to pull 3 posts from Category ID #1, and while you&#8217;re in there I&#8217;ll take the permalink to Category #1 as well&#8230;&#8221; </em><strong> </strong></p>
<p><strong>This is exactly the same as The WordPress Loop</strong>. When you create a sub-loop, you get to pull ALL the same post data as  the regular WordPress Loop, you&#8217;re just doing it outside, thus it&#8217;s  called the &#8220;sub-loop&#8221;. Now, let&#8217;s start printing the data with what WordPress calls, &#8220;Template Tags&#8221;. Template Tags are just variables that become available to you when you query the database. <a href="http://codex.wordpress.org/Template_Tags" target="_blank">Here is the official list</a>.</p>
<p><strong>For example:</strong></p>
<p><code>&lt;?php the_title(); ?&gt;</code> will show us the Post Title.</p>
<p><code>&lt;?php the_permalink(); ?&gt;</code> will gives us the Post&#8217;s Permalink</p>
<p><code>&lt;?php the_exceprt(); ?&gt;</code> will show us the Excerpt</p>
<h2><strong>The &#8220;Teaser&#8221; Box<br />
</strong></h2>
<p>Let&#8217;s put this code into a real world situation. Using CSS and some of those &#8220;Template Tags&#8221; you can create your own &#8220;Teaser&#8221; box.<strong><br />
</strong></p>
<pre><code>&lt;div id="news"&gt; <strong>&lt;-- Start the "Teaser" box</strong>

&lt;div class="headline"&gt; <strong>&lt;-- Start the Post Title</strong>
   &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;

&lt;div class="thumb"&gt; <strong>&lt;-- Start the Post Thumbnail</strong>
  &lt;?php the_post_thumbnail( array(100,100) ); ?&gt;
&lt;/div&gt;

&lt;div class="excerpt"&gt; <strong>&lt;-- Start the Post Excerpt</strong>
  &lt;p&gt;&lt;?php the_excerpt(); ?&gt;...&lt;br /&gt;
    &lt;a href="&lt;?php echo $category_link; ?&gt;"&gt;&lt;?php $category = get_the_category(); echo $category[0]-&gt;cat_name; ?&gt;&lt;?php $category = get_the_category(); echo $category[1]-&gt;cat_name; ?&gt;&lt;/a&gt; | &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php echo thesis_teaser_link_text(); ?&gt;&lt;/a&gt; | &lt;a href="&lt;?php the_permalink(); ?&gt;#respond"&gt;Comments { &lt;?php comments_number('0','1','%'); ?&gt; }&lt;/a&gt;
  &lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt; <strong>&lt;-- End the "Teaser" box</strong>
&lt;?php endwhile; ?&gt; <strong>&lt;-- End the sub-loop</strong></code></pre>
<p>Here is how all that works. I created a new &lt;DIV ID&gt; to encompass the entire &#8220;teaser&#8221;. Then I created a new &lt;DIV CLASS&gt; for the headline, post thumbnail, excerpt, permalink, and comment data. If you slow down and actually look at the PHP code you will see how easy it is. WordPress gives us all the tools (variables) we need with <a href="http://codex.wordpress.org/Template_Tags" target="_blank">Template Tags</a>.</p>
<p>I want to take a sec to talk about pulling out the Thumbnail. Since WP 2.9.0, the programmers of WordPress created awesome new functionality that has <strong>not yet been made available in Thesis</strong> (at press time, Thesis 1.6). So, in order to pull out thumbnails; <strong>YOU MUST</strong> add this line of code ANYWHERE in custom_functions.php: <code>add_theme_support( 'post-thumbnails' );</code> You can learn all about the new WP 2.9+ Thumbnail features by reading <a href="http://justintadlock.com/archives/2009/11/16/everything-you-need-to-know-about-wordpress-2-9s-post-image-feature" target="_blank">Justin Adocks blog post</a>.</p>
<h2>The Final Output</h2>
<pre><code>&lt;?php
$sub_loop_1 = new WP_Query("cat=1&amp;showposts=3");
while ($sub_loop_1-&gt;have_posts()) : $sub_loop_1-&gt;the_post();
$category_link = get_category_link('1');
?&gt;
&lt;div id="news"&gt;

&lt;div&gt;
   &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;?php the_post_thumbnail( array(100,100) ); ?&gt;
&lt;/div&gt;

&lt;div&gt;
&lt;p&gt;&lt;?php the_excerpt(); ?&gt;...&lt;br /&gt;
&lt;a href="&lt;?php echo $category_link; ?&gt;"&gt;&lt;?php $category = get_the_category(); echo $category[0]-&gt;cat_name; ?&gt;&lt;?php $category = get_the_category(); echo $category[1]-&gt;cat_name; ?&gt;&lt;/a&gt; | &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php echo thesis_teaser_link_text(); ?&gt;&lt;/a&gt; | &lt;a href="&lt;?php the_permalink(); ?&gt;#respond"&gt;Comments { &lt;?php comments_number('0','1','%'); ?&gt; }&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;
&lt;?php endwhile; ?&gt;</code></pre>
<p>See it in action: <a href="http://thetimes.gregrickaby.com" target="_blank">here</a>, <a href="http://kendallvandyk.com/" target="_blank">here</a>, and <a href="http://winstoncountyms.com/" target="_blank">here</a>, (yeah I do this a lot)</p>
<h2>Closing Statement</h2>
<p>When people call me for PSD Conversions they often comment, <em>&#8220;We&#8217;re not sure we can do this with Thesis&#8230;&#8221;</em> and it usually involves a custom page template and a sub-loop. Learning these skills will not only help you as a programmer, but being a hero too.</p>
<p>You see, when a client throws up a brick-wall-deal-breaker about making Thesis not LOOK LIKE Thesis, you can say with confidence, <em>&#8220;Bring it on!&#8221; </em>And that is all.<em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/03/how-to-create-a-sub-loop-in-thesis.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To: Create Additional Page Templates</title>
		<link>http://gregrickaby.com/2010/02/how-to-create-additional-page-templates.html</link>
		<comments>http://gregrickaby.com/2010/02/how-to-create-additional-page-templates.html#comments</comments>
		<pubDate>Mon, 08 Feb 2010 18:36:43 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=3386</guid>
		<description><![CDATA[A few weeks ago I showed you how to make a Custom Homepage Template. Today, I will show you how to create additional page templates which will allow you to further customize Thesis without hacking core files. This tutorial is based on my WidgetMe Framework. Which allows you to create additional page templates with page [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://gregrickaby.com/2010/02/how-to-create-additional-page-templates.html" title="Permanent link to How To: Create Additional Page Templates"><img class="post_image alignnone" src="http://gregrickaby.com/wp-content/uploads/2010/02/additional-page-templates.jpg" width="680" height="250" alt="Post image for How To: Create Additional Page Templates" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F02%2Fhow-to-create-additional-page-templates.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F02%2Fhow-to-create-additional-page-templates.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/02/additional-page-templates.jpg"><img class="aligncenter size-full wp-image-3557" title="additional-page-templates" src="http://gregrickaby.com/wp-content/uploads/2010/02/additional-page-templates.jpg" alt="" width="680" height="250" /></a></p>
<p>A few weeks ago I showed you how to make a <a href="http://gregrickaby.com/2010/01/how-to-create-a-custom-page-template.html">Custom Homepage Template</a>. Today, I will show you how to create additional page templates which will allow you to further customize Thesis without hacking core files.</p>
<p>This tutorial is based on my <a href="http://gregrickaby.com/2009/09/thesis-sub-framework-widget-me.html">WidgetMe Framework</a>. Which allows you to create additional page templates with page specific widgets.Why would you need this functionality? Take a look at a recent <a href="http://winstoncountyms.com/" target="_blank">PSD Conversion</a> and pay attention to pages that have their own sidebars and menus. This is all done with a Custom Page Templates.</p>
<h2>Easy Breezy</h2>
<p><strong>Step 1:</strong> Create a new PHP document, and paste this code in the top:</p>
<pre><code>&lt;?php
/**
 * Template Name: About Us
 */
</code></pre>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-1.jpg"><img class="alignnone size-thumbnail wp-image-3387" title="custom-page-template-1" src="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-1-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><strong>Explanation: </strong>What you&#8217;ve just done is created some code for WordPress to scan. WordPress will read these four lines of code and automatically add this page to a list of page templates. <em>(This functionality is actually a native <strong>WordPress</strong> feature &#8211; <strong>not Thesis</strong>!)<br />
</em></p>
<p><strong>Step 2:</strong> Save the PHP file as &#8220;about-us.php&#8221; <strong>Note:</strong> the file name <em>MUST</em> match line 3, using dashes for spaces</p>
<p><strong>Step 3:</strong> Upload this to: /wp-content/themes/thesis_16/</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-2.jpg"><img class="alignnone size-thumbnail wp-image-3389" title="Upload custom-page-template" src="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-2-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p><strong>Step 4: </strong>Create a new page (or edit an existing one) and select &#8220;About Us&#8221; from the drop-down</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-3.jpg"><img class="alignnone size-thumbnail wp-image-3410" title="custom-page-template-3" src="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-3-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>Now publish.</p>
<h2>The Fun Part</h2>
<p>Let&#8217;s get coding.</p>
<pre><code>&lt;?php
/**
 * Template Name: About Us
 */
?&gt;
 &lt;div id="custom-page"&gt;
 	&lt;div class="content-column"&gt;
    	A whole bunch of content here.
 	&lt;/div&gt;
 	&lt;div class="sidebars"&gt;
 		&lt;?php echo thesis_sidebars(); ?&gt;
 	&lt;/div&gt;
 &lt;/div&gt;
</code></pre>
<p>When finished, save and upload. Nothing elaborate, but end result of this would be:</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-5.jpg"><img class="alignnone size-thumbnail wp-image-3395" title="custom-page-template-5" src="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-5-150x150.jpg" alt="" width="150" height="150" /></a></p>
<h2>Taking it to the next level</h2>
<p>If you noticed, I used:</p>
<pre><code>&lt;?php echo thesis_sidebars(); ?&gt;</code></pre>
<p>to place my sidebars from Thesis into this page template. That&#8217;s not the only Thesis function you can add. For example:</p>
<p>thesis_default_header();<br />
thesis_nav_menu();<br />
thesis_footer_area();</p>
<p>etc&#8230;</p>
<p><strong>Explanation:</strong> What you&#8217;re doing is actually PHP 101. You&#8217;re simply calling a function that Chris Pearson wrote for Thesis and printing it. Let&#8217;s see a more advanced example:</p>
<pre><code>&lt;?php
/**
 * Template Name: About Us
 */
?&gt;
&lt;?php echo thesis_header(); ?&gt;
&lt;?php echo thesis_nav_menu(); ?&gt;
 &lt;div id="custom-page"&gt;
 	&lt;div class="content-column"&gt;
    	A whole bunch of content here.
 	&lt;/div&gt;
 	&lt;div class="sidebars"&gt;
 		&lt;?php echo thesis_sidebars(); ?&gt;
 	&lt;/div&gt;
 &lt;/div&gt;
&lt;?php echo thesis_footer_area(); ?&gt;
</code></pre>
<p>Will return this:</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-6.jpg"><img class="alignnone size-thumbnail wp-image-3402" title="custom-page-template-6" src="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-6-150x150.jpg" alt="" width="150" height="150" /></a></p>
<h2>Putting it all together</h2>
<p>We&#8217;re getting there! All that&#8217;s missing is CSS. Let&#8217;s call some style-sheets:</p>
<pre><code>&lt;?php
/**
 * Template Name: About Us
 */
?&gt;

&lt;head&gt;
	&lt;link rel="stylesheet" href="&lt;?php bloginfo('template_url'); ?&gt;/style.css" type="text/css" media="screen, projection" /&gt;
	&lt;link rel="stylesheet" href="&lt;?php bloginfo('template_url'); ?&gt;/custom/layout.css" type="text/css" media="screen, projection" /&gt;
	&lt;link rel="stylesheet" href="&lt;?php bloginfo('template_url'); ?&gt;/custom/custom.css" type="text/css" media="screen, projection" /&gt;
&lt;/head&gt;
&lt;?php echo thesis_header(); ?&gt;
&lt;?php echo thesis_nav_menu(); ?&gt;
 &lt;div id="custom-page"&gt;
 	&lt;div class="content-column"&gt;
    	A whole bunch of content here.
 	&lt;/div&gt;
 	&lt;div class="sidebars"&gt;
 		&lt;?php echo thesis_sidebars(); ?&gt;
 	&lt;/div&gt;
 &lt;/div&gt;
&lt;?php echo thesis_footer_area(); ?&gt;
</code></pre>
<p>Returns this: <a href="http://gregrickaby.com/sample-about-us-for-tutorial" target="_blank">http://gregrickaby.com/sample-about-us-for-tutorial</a> (go ahead and view-source)</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-61.jpg"><img class="alignnone size-thumbnail wp-image-3404" title="custom-page-template-6" src="http://gregrickaby.com/wp-content/uploads/2010/02/custom-page-template-61-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>As you can see, you get to re-invent the wheel &#8211; except in your toolbox you have WordPress and Thesis! <img src='http://gregrickaby.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Have fun.</p>
<h2>List of Thesis Functions &amp; Frameworks</h2>
<p><strong>Header</strong><br />
thesis_header_area();</p>
<p><strong>Content</strong><br />
thesis_content();</p>
<p><strong>Sidebars</strong><br />
thesis_sidebars();<br />
thesis_sidebar_1();<br />
thesis_sidebar_2();</p>
<p><strong>Footer</strong><br />
thesis_footer_area();<br />
thesis_attribution();</p>
<p><strong>Full-Width Framework</strong><br />
thesis_wrap_header();<br />
thesis_wrap_content();<br />
thesis_wrap_footer();</p>
<p><strong>The Mac-Daddy Framework</strong> (when used, will simply print Thesis as a whole)<br />
thesis_html_framework();</p>
<p>There are actually about 50 more of these, but those listed above encompass all the smaller ones. For a complete list of Functions, navigate to: /wp-content/themes/thesis_16/lib/html/ and take a look.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/02/how-to-create-additional-page-templates.html/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>How To: Create a Custom Page Template</title>
		<link>http://gregrickaby.com/2010/01/how-to-create-a-custom-page-template.html</link>
		<comments>http://gregrickaby.com/2010/01/how-to-create-a-custom-page-template.html#comments</comments>
		<pubDate>Thu, 07 Jan 2010 16:33:27 +0000</pubDate>
		<dc:creator>Greg Rickaby</dc:creator>
				<category><![CDATA[Thesis Tutorials]]></category>
		<category><![CDATA[Customization]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://gregrickaby.com/?p=3281</guid>
		<description><![CDATA[Custom page templates are the easiest way to make a whole new web design &#8211; inside of Thesis. Imagine, all of this space could be yours to code however YOU want&#8230;INSIDE of Thesis. In this tutorial, I&#8217;ll show you how to create a custom homepage template, while using a conditional tag and a little custom PHP [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://gregrickaby.com/2010/01/how-to-create-a-custom-page-template.html" title="Permanent link to How To: Create a Custom Page Template"><img class="post_image alignnone" src="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-templates.jpg" width="680" height="250" alt="Post image for How To: Create a Custom Page Template" /></a>
</p><div class="tweetmeme_button" style="float: right; margin-right: 0px; padding: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F01%2Fhow-to-create-a-custom-page-template.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fgregrickaby.com%2F2010%2F01%2Fhow-to-create-a-custom-page-template.html&amp;source=grickaby&amp;style=normal&amp;service=bit.ly&amp;service_api=R_f50c5fb95f9f856c2983227fea02aff6" height="61" width="50" /><br />
			</a>
		</div>
<p>Custom page templates are the easiest way to make a whole new web design &#8211; inside of Thesis. Imagine, all of this space could be yours to code however <em>YOU</em> want&#8230;<em>INSIDE</em> of Thesis.</p>
<div id="attachment_3282" class="wp-caption alignnone" style="width: 554px">
	<a href="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-template-1.gif"><img class="size-medium wp-image-3282" title="custom-page-template-1" src="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-template-1-554x480.gif" alt="" width="554" height="480" /></a>
	<p class="wp-caption-text">Use the blank space Luke...</p>
</div>
<p>In this tutorial, I&#8217;ll show you <strong><em>how to </em></strong><em><strong>create a custom homepage template</strong></em>, while using a conditional tag and a little custom PHP code.</p>
<p><strong>Step 1.</strong> Create a new PHP page and name it <em>home.php</em>. Upload it to: /wp-content/themes/thesis_16/custom/</p>
<p><strong>Step 2.</strong> Open custom-functions.php and paste this at the bottom of the file.</p>
<pre><code>// Remove Default Page Template
remove_action('thesis_hook_custom_template', 'thesis_custom_template_sample');

// Custom Page Template
function custom_homepage() {
	if ( is_front_page() ) {
		include (TEMPLATEPATH . '/custom/home.php');
	}
}
add_action('thesis_hook_custom_template', 'custom_homepage');
</code></pre>
<p><strong>Step 3.</strong> Log-in to your WP Dashboard and click on <em>Pages</em> &#8211;&gt; <em>Add New</em></p>
<p><strong>Step 4.</strong> Type &#8220;Homepage&#8221;, leave the content area blank, select &#8220;<em>Custom Template&#8221;</em>, and then click &#8220;<em>Publish&#8221;</em></p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-template-2.gif"><img class="alignnone size-medium wp-image-3283" title="custom-page-template-2" src="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-template-2-640x351.gif" alt="" width="640" height="351" /></a></p>
<p><strong>Step 5.</strong> Go to <em>Settings</em> &#8211;&gt; <em>Reading</em> and check &#8220;A static page&#8221;, then select &#8220;Homepage&#8221;. Click Save.</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-template-3.gif"><img class="alignnone size-medium wp-image-3284" title="custom-page-template-3" src="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-template-3-640x351.gif" alt="" width="640" height="351" /></a></p>
<p><strong>Step 6.</strong> The Result:</p>
<p><a href="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-template-4.gif"><img class="alignnone size-medium wp-image-3285" title="custom-page-template-4" src="http://gregrickaby.com/wp-content/uploads/2010/01/custom-page-template-4-640x175.gif" alt="" width="640" height="175" /></a></p>
<p>The possibilities are endless here. If you&#8217;ve ever seen a Thesis design that DIDN&#8217;T look like Thesis, chances are they are using custom page templates.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/jqODzZ2Mbew&amp;hl=en_US&amp;fs=1&amp;hd=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/jqODzZ2Mbew&amp;hl=en_US&amp;fs=1&amp;hd=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<h2>UPDATE: 3/3/10</h2>
<p>Here is a real-world working example of home.php below (<a href="http://kendallvandyk.com/" target="_blank">See it live</a>)</p>
<pre><code>&lt;?php echo thesis_sidebars(); ?&gt;
&lt;div&gt;
 &lt;a href="#"&gt;&lt;img src="&lt;?php echo get_bloginfo('template_url'); ?&gt;/custom/images/multimedia-box.jpg" /&gt;&lt;/a&gt;
 &lt;a href="#"&gt;&lt;img src="&lt;?php echo get_bloginfo('template_url'); ?&gt;/custom/images/multimedia-box1.jpg" /&gt;&lt;/a&gt;
 &lt;a href="#"&gt;&lt;img src="&lt;?php echo get_bloginfo('template_url'); ?&gt;/custom/images/multimedia-box2.jpg" /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;div id="news"&gt;
 &lt;img src="&lt;?php echo get_bloginfo('template_url'); ?&gt;/custom/images/bar-1.jpg" /&gt;&lt;br /&gt;
&lt;?php
$category_box_1 = new WP_Query("cat=1&amp;showposts=2");
while ($category_box_1-&gt;have_posts()) : $category_box_1-&gt;the_post();
$category_link = get_category_link('1');
?&gt;
&lt;div class="news"&gt;
 &lt;div id="headline"&gt;
  &lt;h2&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
 &lt;/div&gt;
 &lt;div id="thumb"&gt;
  &lt;?php the_post_thumbnail( array(100,100) );  ?&gt;
 &lt;/div&gt;
 &lt;div id="excerpt"&gt;
  &lt;p&gt;&lt;?php the_excerpt(); ?&gt;...&lt;br /&gt;
   &lt;a href="&lt;?php echo $category_link; ?&gt;"&gt;&lt;?php $category = get_the_category(); echo $category[0]-&gt;cat_name; ?&gt;&lt;?php $category = get_the_category(); echo $category[1]-&gt;cat_name; ?&gt;&lt;/a&gt; | &lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php echo thesis_teaser_link_text(); ?&gt;&lt;/a&gt; | &lt;a href="&lt;?php the_permalink(); ?&gt;#respond"&gt;Comments {&lt;?php comments_number('0','1','%'); ?&gt;}&lt;/a&gt;
  &lt;/p&gt;
 &lt;/div&gt;
&lt;/div&gt;
  &lt;?php endwhile; ?&gt;
  &lt;h3&gt;&lt;a href="&lt;?php echo $category_link; ?&gt;"&gt;Read More &lt;?php $category = get_the_category(); echo $category[0]-&gt;cat_name; ?&gt;...&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;div id="flickr"&gt;
 &lt;ul&gt;
  &lt;?php    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar 1') ){ ?&gt;&lt;?php } ?&gt;
 &lt;/ul&gt;
&lt;/div&gt;</code></pre>
<p>It&#8217;s calling for the Thesis Sidebars, creating a jQuery slide-show, and a sub-loop for the news box.</p>
]]></content:encoded>
			<wfw:commentRss>http://gregrickaby.com/2010/01/how-to-create-a-custom-page-template.html/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>
