<?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>WooThemes &#187; Tutorials</title>
	<atom:link href="http://www.woothemes.com/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.woothemes.com</link>
	<description>Premium WordPress Themes</description>
	<lastBuildDate>Fri, 10 Feb 2012 11:39:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Add more Google Fonts to options</title>
		<link>http://www.woothemes.com/2012/01/add-more-google-fonts-to-options/</link>
		<comments>http://www.woothemes.com/2012/01/add-more-google-fonts-to-options/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 13:03:27 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=15630</guid>
		<description><![CDATA[The WooFramework comes with integrated Google Fonts in the options panel, and we try to update these fonts regularly so new ones are added for you to use. Let&#8217;s look at a method for you to use if your font isn&#8217;t available in the options. Open up your theme&#8217;s functions.php and add this simple function: [...]]]></description>
			<content:encoded><![CDATA[<p>The WooFramework comes with integrated Google Fonts in the options panel, and we try to update these fonts regularly so new ones are added for you to use. Let&#8217;s look at a method for you to use if your font isn&#8217;t available in the options.</p>
<p>Open up your theme&#8217;s <strong>functions.php</strong> and add this simple function:</p>
<pre class="brush:php">
// add the function to the init hook
add_action( 'init', 'woo_add_googlefonts', 20 );

// add a font to the $google_fonts variable
function woo_add_googlefonts () {
	global $google_fonts;
	$google_fonts[] = array( 'name' => 'Lustria', 'variant' => ':r,b,i,bi');
}
</pre>
<p>Here we have added a font name called Lustria, and after adding this it will show up in your options panel.</p>
<div id="attachment_15631" class="wp-caption aligncenter" style="width: 610px"><img src="http://cdn.woothemes.com/wp-content/uploads/2012/01/googlefont-e1327409929935.png" alt="" title="googlefont" width="600" height="234" class="size-full wp-image-15631" /><p class="wp-caption-text">The new font in the typography option</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2012/01/add-more-google-fonts-to-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace menu item with an icon</title>
		<link>http://www.woothemes.com/2012/01/replace-menu-item-with-an-icon/</link>
		<comments>http://www.woothemes.com/2012/01/replace-menu-item-with-an-icon/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 11:19:34 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=15539</guid>
		<description><![CDATA[Here is a simple guide on how to replace a menu item with an icon. For this example we&#8217;ll replace the &#8220;Home&#8221; item in our Canvas demo. First, lets find a nice home icon. If you go to IconFinder you can search for &#8220;home&#8221; and find many nice ones. We&#8217;re going to use this one, [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a simple guide on how to replace a menu item with an icon. For this example we&#8217;ll replace the &#8220;Home&#8221; item in our Canvas demo.</p>
<div class="woo-sc-box normal   ">Your menu needs to be setup using WP Menus for the correct menu ID&#8217;s to be outputted.</div>
<p>First, lets find a nice home icon. If you go to <a href="http://www.iconfinder.com">IconFinder</a> you can search for &#8220;home&#8221; and find many nice ones. We&#8217;re going to use <a href="http://www.iconfinder.com/icondetails/20606/24/blue_home_house_index_icon">this one</a>, so download that and upload to your site. Use <strong>Media-&gt;Add New</strong> and copy the URL to the image after uploading.</p>
<p>Next step is to use <a href="http://www.woothemes.com/2009/01/customizing-your-theme-with-firebug/">Firebug</a> to inspect a menu item, so you can find the <strong>ID</strong> of the list element.</p>
<div id="attachment_15540" class="wp-caption aligncenter" style="width: 479px"><img class="size-full wp-image-15540" title="firebug" src="http://cdn.woothemes.com/wp-content/uploads/2012/01/firebug.png" alt="" width="469" height="578" /><p class="wp-caption-text">Right click the menu item and inspect element to find the ID to use later.</p></div>
<p>Once we have the ID we can start adding some CSS to<strong> custom.css</strong> in your theme through <strong>Apperance-&gt;Editor</strong>.</p>
<pre class="brush:css">#menu-item-290 {
     margin-left: 10px;
     width: 32px;
}
#menu-item-290 a {
     background: url("http://cdn2.iconfinder.com/data/icons/gnomeicontheme/24x24/actions/redhat-home.png") no-repeat scroll 0pt 0pt transparent;
     text-indent: -99em;
}</pre>
<p>The first style targets the main list element, and sets the width to 32px so it&#8217;s the same width as the image, and just moves the image 10px to the right.</p>
<p>The second style targets the link or anchor inside the list element, and sets the background of that anchor to the icon. To hide the text we simply move it off the screen with negative text indent.</p>
<p>That&#8217;s it! The finished product will look like this:</p>
<div id="attachment_15541" class="wp-caption aligncenter" style="width: 549px"><img class="size-full wp-image-15541" title="home" src="http://cdn.woothemes.com/wp-content/uploads/2012/01/home.png" alt="" width="539" height="327" /><p class="wp-caption-text">The Home linnk replaced by a home icon!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2012/01/replace-menu-item-with-an-icon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a Twitter feed to your header</title>
		<link>http://www.woothemes.com/2012/01/add-a-twitter-feed-to-your-header/</link>
		<comments>http://www.woothemes.com/2012/01/add-a-twitter-feed-to-your-header/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 09:34:04 +0000</pubDate>
		<dc:creator>Tiago Noronha</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=15295</guid>
		<description><![CDATA[When you have more than 100 themes, it is expected that some users will want to port features between themes. One of the most requested is the Twitter feed that you can see in the header of the Busybee theme. In this tutorial you&#8217;ll learn how to add a Twitter feed to the Canvas header [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>When you have more than 100 themes, it is expected that some users will want to port features between themes. One of the most requested is the Twitter feed that you can see in the header of the Busybee theme. In this tutorial you&#8217;ll learn how to add a Twitter feed to the Canvas header using hooks.</p>
<h4>The final result</h4>
<div id="attachment_15296" class="wp-caption aligncenter" style="width: 293px"><a href="http://cdn.woothemes.com/wp-content/uploads/2012/01/twitter_canvas_header.png"><img class="size-full wp-image-15296" title="twitter_canvas_header" src="http://cdn.woothemes.com/wp-content/uploads/2012/01/twitter_canvas_header.png" alt="" width="283" height="85" /></a><p class="wp-caption-text">A Twitter feed in the Canvas header</p></div>
<h4>The finished code</h4>
<pre class="brush:php">add_action('woo_header_inside','woo_add_twitter_header', 10);
function woo_add_twitter_header() {
?&gt;

&lt;div id="twitter_header"&gt;
 &lt;ul id="twitter_update_list_header"&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;
 &lt;?php echo woo_twitter_script('header', 'woothemes', 1); ?&gt;
 &lt;div class="fix"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;?php
} // End woo_add_twitter_header()</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<h4>What the code does</h4>
<ol>
<li>Instruct the “woo_header_inside” hook to look for and execute the “woo_add_twitter_header()” function.</li>
<li>Setup a wrapping DIV tag with an ID of &#8220;twitter_header&#8221; and the necessary markup for the Twitter script. The PHP code outputs the Twitter feed for the username <em>woothemes</em> (<span style="text-decoration: underline;">replace with yours</span>).</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_header_inside&#8221; action hook is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<h4>Lastly, the CSS and the Twitter bird image</h4>
<p>If you test the code right now, you should see the Twitter feed in your header above your logo. We don&#8217;t want it there so we must add some CSS to the &#8220;custom.css&#8221; file.</p>
<pre class="brush:php">#twitter_header { float: right; padding-left:60px; background:url(images/twitter_bird.png) no-repeat left center; }
#twitter_header a.time { display:block; }</pre>
<p>The CSS above adds the Twitter bird image as background to the left of your &#8220;twitter_header&#8221; DIV and also some padding or the image would be under your text. The last line moves the time to a new line.</p>
<p>You can grab the Twitter bird <strong><a title="Twitter Bird icon" href="http://cdn.woothemes.com/wp-content/uploads/2012/01/twitter_bird.png" target="_blank">HERE</a></strong>. Add it to your theme &#8220;images&#8221; folder or, alternatively, replace &#8220;images/twitter_bird.png&#8221; with the full url to the image (example: http://your-site.com/twitter_bird.png).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2012/01/add-a-twitter-feed-to-your-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An introduction to LESS CSS</title>
		<link>http://www.woothemes.com/2011/11/an-introduction-to-less-css/</link>
		<comments>http://www.woothemes.com/2011/11/an-introduction-to-less-css/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 18:48:49 +0000</pubDate>
		<dc:creator>James Koster</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=13724</guid>
		<description><![CDATA[If you&#8217;ve had a look under-the-hood of WooCommerce or any of our new themes you may have noticed some unusual .less files that accompany our normal .css files. In this post I will explain those files, and introduce the Woo community to a CSS pre-processor which is taking the web design world by storm; LESS [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lesscss.org/"><img class="alignright size-full wp-image-14548" title="less-logo" src="http://cdn.woothemes.com/wp-content/uploads/2011/11/less-logo.png" alt="LESS CSS" width="199" height="81" /></a>If you&#8217;ve had a look under-the-hood of WooCommerce or any of our new themes you may have noticed some unusual <strong>.less</strong> files that accompany our normal <strong>.css</strong> files. In this post I will explain those files, and introduce the Woo community to a CSS pre-processor which is taking the web design world by storm; <strong>LESS CSS.</strong></p>
<h2>LESS CSS?</h2>
<blockquote><p>LESS extends CSS with dynamic behavior such as variables, mixins, operations and functions.</p></blockquote>
<p>LESS is a language much akin to CSS which we all know and love. As the quote above says, it <em>extends</em> CSS in different ways, making it modular, flexible and quicker to write. It&#8217;s a perfect partner for CSS3 with it&#8217;s vendor prefixes.</p>
<div class="woo-sc-box note   ">It&#8217;s important to note that while we&#8217;re using LESS to author better CSS, <em><strong>you don&#8217;t have to</strong></em>. You can still edit any CSS file as you have in the past. But LESS is such a fantastic tool I would recommend that if you&#8217;re into tinkering with our themes that you at least give it a try.</div>
<p>If you can write CSS, you can write LESS. There are however have a couple of options to consider before diving in; particularly whether to compile your LESS files locally via an app or remotely via JavaScript. While it takes a little time to set up I would recommend using a desktop application every time rather than forcing unnecessary bandwidth usage on your server.</p>
<div class="woo-sc-box normal   ">We recommend using either <strong><a title="LESS.app" href="http://incident57.com/less/">LESS.app</a></strong> (Mac only) or the new <strong><a href="http://wearekiss.com/simpless">SimpLESS</a></strong> (Mac, PC, Linux) to compile your LESS files. To get an understanding on compiling LESS, it&#8217;s worth <a href="http://incident57.com/less/">watching the 3-minute tutorial video on LESS.app website.</a> </div>
<p>So with the boring bit out the way, let&#8217;s have a look at the language itself. As I said, if you&#8217;re comfortable with CSS then LESS will be very easy to pick up. I&#8217;ll echo a few examples from the LESS site to demonstrate some of the ways we use it to improve the CSS in our new themes.</p>
<h3>Variables</h3>
<blockquote><p>Variables allow you to specify widely used values in a single place, and then re-use them throughout the style sheet, making global changes as easy as changing one line of code.</p></blockquote>
<pre class="brush:css">@color: #4D926F;

#header {
  color: @color;
}
h2 {
  color: @color;
}</pre>
<p>In this example a color is specified as a variable. This can be used throughout your LESS document in any place you want to utilize that color. The above would be compiled thusly:</p>
<pre class="brush:css">#header {
  color: #4D926F;
}
h2 {
  color: #4D926F;
}</pre>
<p>The beauty of this is that if you should want to change that color at any point, you simply change the variable in your LESS file and save it to compile the CSS. Obviously this is much quicker than going through the entire document finding and replacing.</p>
<h3>Mixins</h3>
<blockquote><p>Mixins allow you to embed all the properties of a class into another class by simply including the class name as one of its properties. It’s just like variables, but for whole classes. Mixins can also behave like functions, and take arguments.</p></blockquote>
<p>Mixins are particularly useful given the range of vendor prefixes we find in CSS3. Let&#8217;s say you wanted to make a div have rounded corners. In traditional CSS you would apply the following to your class(es):</p>
<pre class="brush:css">.rounded {
-webkit-border-radius:10px;
-moz-border-radius:10px;
-o-border-radius:10px;
border-radius:10px;
}</pre>
<p>This can be extremely tedious, especially when you want round specific corners, or if standards evolve and certain Vendor prefixes are no longer necessary, or more are required. Mixins allow us to specify these rules once, and then call on them throughout the rest of our LESS file. Here&#8217;s another example:</p>
<pre class="brush:css">.border_radius (@radius: 10px) {
-webkit-border-radius:@radius;
-moz-border-radius:@radius;
-o-border-radius:@radius;
border-radius:@radius;
}

#header {
.border_radius;
}

#footer {
.border_radius(20px);
}</pre>
<p>This would output the following:</p>
<pre class="brush:css">#header {
-webkit-border-radius:10px;
-moz-border-radius:10px;
-o-border-radius:10px;
border-radius:10px;
}

#footer {
-webkit-border-radius:20px;
-moz-border-radius:20px;
-o-border-radius:20px;
border-radius:20px;
}</pre>
<p>It&#8217;s plain to see that even using basic mixins will rapidly increase the speed at which you can write and globally modify your CSS.</p>
<h3>Nested Rules</h3>
<blockquote><p>Rather than constructing long selector names to specify inheritance, in Less you can simply nest selectors inside other selectors. This makes inheritance clear and style sheets shorter.</p></blockquote>
<p>My personal favorite LESS feature is nested rules. It&#8217;s simple, but once again makes CSS easier to write <em>and</em> easier to read / organise. Let&#8217;s look at another example:</p>
<pre class="brush:css">#header {
  h1 {
    font-size: 26px;
    font-weight: bold;
  }
  p { font-size: 12px;
    a { text-decoration: none;
      &amp;:hover { border-width: 1px }
    }
  }
}</pre>
<p>The above would output:</p>
<pre class="brush:css">#header h1 {
  font-size: 26px;
  font-weight: bold;
}
#header p {
  font-size: 12px;
}
#header p a {
  text-decoration: none;
}
#header p a:hover {
  border-width: 1px;
}</pre>
<p>Pretty nifty!</p>
<p>These are probably the three simplest features of LESS but they clearly represent what it&#8217;s all about and how it can help any project. Hopefully it has been enough to whet your appetite to find out more.</p>
<div class="woo-sc-box normal   ">Be sure to discover the rest of it&#8217;s features on the <a title="LESS CSS" href="http://lesscss.org/">LESS web site</a> before this post turns into a code fest!</div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/11/an-introduction-to-less-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove all rounded corners</title>
		<link>http://www.woothemes.com/2011/10/remove-all-rounded-corners/</link>
		<comments>http://www.woothemes.com/2011/10/remove-all-rounded-corners/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 10:35:23 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=13729</guid>
		<description><![CDATA[Some might not like the use of rounded corners, so the solution would be to go through style.css and find all CSS selectors that have border-radius set and then add it to custom.css. This was done on a user request and here are the selectors from style.css: .nav li ul li a, .nav a, .nav [...]]]></description>
			<content:encoded><![CDATA[<p>Some might not like the use of rounded corners, so the solution would be to go through style.css and find all CSS selectors that have border-radius set and then add it to custom.css. This was done on a user request and here are the selectors from style.css:</p>
<pre class="brush:css">
.nav li ul li a,
.nav a, .nav li.current_page_item, .nav li.current_page_parent, .nav li.current-menu-ancestor, .nav li.current-menu-item, .nav li.sfHover, .nav li.selected,
#top .nav li.sfHover a,
#top .nav li ul, #top .nav li ul li:last-child a,
.woo-pagination a:link, .woo-pagination a:visited, .woo-pagination a:active, .woo-pagination span.current,
.searchform,
.widget_woo_twitter .back,
#tabs,
#tabs ul.wooTabs li a.selected, #tabs ul.wooTabs li a:hover,
#comments .reply a,
.button, .button:visited, .reply a, #respond .form-submit input#submit,
#connect .newsletter-form .submit,
#portfolio #port-tags .port-cat a
{
   border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/10/remove-all-rounded-corners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a category tree to single post breadcrumbs</title>
		<link>http://www.woothemes.com/2011/10/adding-a-category-tree-to-single-post-breadcrumbs/</link>
		<comments>http://www.woothemes.com/2011/10/adding-a-category-tree-to-single-post-breadcrumbs/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 12:52:26 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=13703</guid>
		<description><![CDATA[The woo_breadcrumbs() functionality, bundled with the WooFramework, provides ease and flexibility when displaying breadcrumbs on your website. In this tutorial, we&#8217;ll discuss adding a category tree for the current blog post into the breadcrumb on all single blog post screens. The finished code Before we start, lets take a look at the finished code. // [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+ and WooFramework V4.5.1+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>The woo_breadcrumbs() functionality, bundled with the WooFramework, provides ease and flexibility when displaying breadcrumbs on your website. In this tutorial, we&#8217;ll discuss adding a category tree for the current blog post into the breadcrumb on all single blog post screens.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
// Add the full categories hierarchy to the breadcrumb trail.
add_filter( 'woo_breadcrumbs_trail', 'woo_custom_breadcrumbs_trail_add_categories', 10 );

function woo_custom_breadcrumbs_trail_add_categories ( $trail ) {
	if ( ( get_post_type() == 'post' ) &#038;&#038; is_singular() ) {
		global $post;

		$category_objs = get_the_category( $post->ID );
		$links = array();

		foreach ( $category_objs as $c ) {
			$parents = get_category_parents( $c->cat_ID, true, ', ' );
			if ( $parents != '' ) {
				$parents_arr = explode( ', ', $parents );

				foreach ( $parents_arr as $p ) {
					if ( $p != '' ) { $links[] = $p; }
				}
			}
		}

		// Add the trail back on to the end.
		$links[] = $trail['trail_end'];

		// Add the new links, and the original trail's end, back into the trail.
		array_splice( $trail, 1, count( $trail ) - 1, $links );
	}

	return $trail;
} // End woo_custom_breadcrumbs_trail_add_categories()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<div class="woo-sc-box note   ">This code is best used in a setup where each post is assigned to a single category. If multiple categories are assigned, all assigned categories will display though.</div>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Instruct the &#8220;woo_breadcrumbs_trail&#8221; filter to look for and execute the &#8220;woo_custom_breadcrumbs_trail_add_categories()&#8221; function.</li>
<li>If we&#8217;re on a single post screen, get all categories assigned to the post.</li>
<li>For each of those categories, loop through and get the category&#8217;s parents, each time adding the category to the breadcrumb trail (from the assigned category up to the top level parent category).</li>
<li>Add the current post title to the end of our new array and merge this new array with the existing breadcrumb, using the array_splice() PHP function.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_breadcrumbs_trail&#8221; filter is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>The final result looks something like this:</p>
<div id="attachment_13705" class="wp-caption alignnone" style="width: 610px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/10/canvas-breadcrumbs-categorytree.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/10/canvas-breadcrumbs-categorytree-600x400.png" alt="" title="The category tree for &quot;Category 3&quot; in the breadcrumb, as viewed on a single post screen" width="600" height="400" class="size-medium wp-image-13705" /></a><p class="wp-caption-text">The category tree for &quot;Category 3&quot; in the breadcrumb, as viewed on a single post screen</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/10/adding-a-category-tree-to-single-post-breadcrumbs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add the &#8220;Business&#8221; slider to the default WordPress homepage</title>
		<link>http://www.woothemes.com/2011/10/add-the-business-slider-to-the-default-wordpress-homepage/</link>
		<comments>http://www.woothemes.com/2011/10/add-the-business-slider-to-the-default-wordpress-homepage/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 06:59:35 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=13542</guid>
		<description><![CDATA[The &#8220;Business&#8221; slider and page template are an ideal way to feature your services or products in a sliding area and, if using the page template, display information below the slider area, showcasing information about your business or service offering. In certain instances, you may want the &#8220;Business&#8221; slider and not the information below. Following [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+ and WooFramework V4.5.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>The &#8220;Business&#8221; slider and page template are an ideal way to feature your services or products in a sliding area and, if using the page template, display information below the slider area, showcasing information about your business or service offering. In certain instances, you may want the &#8220;Business&#8221; slider and not the information below. Following on from our tutorial on how to add the &#8220;Magazine&#8221; slider to the default WordPress &#8220;Your Latest Posts&#8221; homepage, this tutorial discusses how to add the &#8220;Business&#8221; slider to the homepage, above both the post list and the widgetised sidebar.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">

// Display the "Business" slider above the default WordPress homepage.
add_action( 'get_header', 'woo_custom_load_biz_slider', 10 );

function woo_custom_load_biz_slider () {
	if ( is_front_page() &#038;&#038; ! is_paged() ) {
		add_action( 'woo_main_before_home', 'woo_slider_biz', 10 );
		add_action( 'woo_main_before_home', 'woo_custom_reset_biz_query', 11 );
		add_action( 'woo_load_slider_js', '__return_true', 10 );
		add_filter( 'body_class', 'woo_custom_add_business_bodyclass', 10 );
	}
} // End woo_custom_load_biz_slider()

function woo_custom_add_business_bodyclass ( $classes ) {
	if ( is_home() ) {
		$classes[] = 'business';
	}
	return $classes;
} // End woo_custom_add_biz_bodyclass()

function woo_custom_reset_biz_query () {
	wp_reset_query();
} // End woo_custom_reset_biz_query()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Load the &#8220;Business&#8221; slider before the &#8220;main&#8221; DIV tag, and only if on page 1, on the homepage.</li>
<li>Instruct the &#8220;Business&#8221; slider JavaScript to load.</li>
<li>Add the &#8220;business&#8221; CSS class to the &lt;body&gt; tag to keep the &#8220;Business&#8221; slider&#8217;s styling.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_main_before&#8221; action or &#8220;woo_load_slider_js&#8221; filter is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>The final result looks something like this:</p>
<div id="attachment_13544" class="wp-caption alignnone" style="width: 610px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/10/canvas-bizslider-homepage.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/10/canvas-bizslider-homepage-600x356.png" alt="" title="The &quot;Business&quot; slider, displaying on the default WordPress homepage" width="600" height="356" class="size-medium wp-image-13544" /></a><p class="wp-caption-text">The &quot;Business&quot; slider, displaying on the default WordPress homepage</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/10/add-the-business-slider-to-the-default-wordpress-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable the grid when paging through the &#8220;Magazine&#8221; page template</title>
		<link>http://www.woothemes.com/2011/09/disable-the-grid-when-paging-through-the-magazine-page-template/</link>
		<comments>http://www.woothemes.com/2011/09/disable-the-grid-when-paging-through-the-magazine-page-template/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 10:28:41 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=13514</guid>
		<description><![CDATA[When using the &#8220;Magazine&#8221; page template provided in Canvas, your blog posts are displayed in a neat grid, similar to how articles are laid out in a printed magazine. What if you want to disable this grid on pages 2, 3, 4, etc, when paging through the &#8220;Magazine&#8221; template? In today&#8217;s tutorial, we&#8217;ll discuss how [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+</div>
<p>When using the &#8220;Magazine&#8221; page template provided in Canvas, your blog posts are displayed in a neat grid, similar to how articles are laid out in a printed magazine. What if you want to disable this grid on pages 2, 3, 4, etc, when paging through the &#8220;Magazine&#8221; template? In today&#8217;s tutorial, we&#8217;ll discuss how a single line of CSS can be used to achieve this result.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
body.paged .block { float: none; display: block; width: 100%; }
</pre>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Use the auto-generated CSS classes added to the &lt;body&gt; tag by WordPress (more information on this on the <a href="http://codex.wordpress.org/Function_Reference/body_class">WordPress Codex Function Reference</a>) to target the &#8220;paged&#8221; screens, specifically.</li>
<li>Reset the &#8220;float&#8221;, &#8220;width&#8221; and &#8220;display&#8221; properties for all &#8220;.block&#8221; items within these &#8220;paged&#8221; screens, such that they take the appropriate default width.</li>
</ol>
<div class="woo-sc-box note   ">The above-mentioned code snippet should be placed in your &#8220;custom.css&#8221; file, when implementing this code into your theme. If you&#8217;re using a child theme, simply place it in your child theme&#8217;s &#8220;style.css&#8221; file.</div>
<p>Through this single line of CSS, we&#8217;re able to entirely change the look of how our &#8220;Magazine&#8221; pages look when visitors browse through beyond the first screen. Nifty, right?</p>
<p>The end result should resemble the following:</p>
<div id="attachment_13516" class="wp-caption alignnone" style="width: 610px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-magazine-nogrid.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-magazine-nogrid-600x698.png" alt="" title="The &quot;Magazine&quot; template, with no grid when paging through" width="600" height="698" class="size-medium wp-image-13516" /></a><p class="wp-caption-text">The &quot;Magazine&quot; template, with no grid when paging through</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/09/disable-the-grid-when-paging-through-the-magazine-page-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating multiple instances of the &#8220;Portfolio&#8221; page template</title>
		<link>http://www.woothemes.com/2011/09/creating-multiple-instances-of-the-portfolio-page-template/</link>
		<comments>http://www.woothemes.com/2011/09/creating-multiple-instances-of-the-portfolio-page-template/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 06:44:39 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=13062</guid>
		<description><![CDATA[In Canvas version 4.5.0, we added a feature to exclude specific portfolio galleries from the &#8220;Portfolio&#8221; page template. This feature can be used in conjunction with multiple instances of the &#8220;Portfolio&#8221; page template customise which portfolio galleries display on each instance of the template. This tutorial aims to explain the logic behind this code in [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.5.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>In Canvas version 4.5.0, we added a feature to exclude specific portfolio galleries from the &#8220;Portfolio&#8221; page template. This feature can be used in conjunction with multiple instances of the &#8220;Portfolio&#8221; page template customise which portfolio galleries display on each instance of the template. This tutorial aims to explain the logic behind this code in more detail.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
add_filter( 'woo_portfolio_gallery_exclude', 'woo_custom_portfolio_gallery_slugs', 10 );

function woo_custom_portfolio_gallery_slugs ( $slugs ) {
	if ( is_page( 'portfolio' ) ) {
		$slugs = 'lakes';
	}

	return $slugs;
} // End woo_custom_portfolio_gallery_slugs()
</pre>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Add a filter on the &#8220;woo_portfolio_gallery_exclude&#8221; hook to run the &#8220;woo_custom_portfolio_gallery_slugs&#8221; function at priority level 10.</li>
<li>If we&#8217;re currently viewing the page with the slug of &#8220;portfolio&#8221;, set the $slugs variable to &#8220;lakes&#8221;, which is the slug of the portfolio gallery to be excluded.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_portfolio_gallery_exclude&#8221; filter is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>To expand on this snippet to work with multiple pages, we could use the following snippet instead:</p>
<pre class="brush:php">
add_filter( 'woo_portfolio_gallery_exclude', 'woo_custom_portfolio_gallery_slugs', 10 );

function woo_custom_portfolio_gallery_slugs ( $slugs ) {
	if ( is_page( 'portfolio' ) ) {
		$slugs = 'lakes';
	}

	if ( is_page( 'a-second-portfolio' ) ) {
		$slugs = 'nature, buildings';
	}

	return $slugs;
} // End woo_custom_portfolio_gallery_slugs()
</pre>
<p>The above snippet excludes the &#8220;lakes&#8221; portfolio gallery from the page with the slug of &#8220;portfolio&#8221;, and the &#8220;nature&#8221; and &#8220;buildings&#8221; portfolio galleries from the page with the slug of &#8220;a-second-portfolio&#8221;, where both pages are setup using the &#8220;Portfolio&#8221; page template. This code could be expanded using any portfolio gallery slugs in the $slug variable (separated by commas) as well as any appropriate condition in the IF statement.</p>
<p>And that&#8217;s all there is to it. We&#8217;ve now setup two pages with the &#8220;Portfolio&#8221; page template and have transformed each into it&#8217;s own dedicated portfolio with it&#8217;s own galleries.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/09/creating-multiple-instances-of-the-portfolio-page-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transform the default Canvas homepage into a &#8220;Magazine&#8221;-style grid</title>
		<link>http://www.woothemes.com/2011/09/transform-the-default-canvas-homepage-into-a-magazine-style-grid/</link>
		<comments>http://www.woothemes.com/2011/09/transform-the-default-canvas-homepage-into-a-magazine-style-grid/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 07:07:25 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=13012</guid>
		<description><![CDATA[While Canvas comes bundled with a &#8220;Magazine&#8221; page template, consisting of a featured posts slider and a &#8220;Magazine&#8221;-style grid, there may be a time when only the grid is required… or a custom implementation of the grid, for that matter. In this tutorial, we&#8217;ll discuss a short code snippet that can be added to your [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.5.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>While Canvas comes bundled with a &#8220;Magazine&#8221; page template, consisting of a featured posts slider and a &#8220;Magazine&#8221;-style grid, there may be a time when only the grid is required… or a custom implementation of the grid, for that matter. In this tutorial, we&#8217;ll discuss a short code snippet that can be added to your &#8220;functions.php&#8221; file to transform the default WordPress &#8220;Your Latest Posts&#8221; homepage into a &#8220;Magazine&#8221;-style grid.</p>
<p>This modification is divided into four parts in your &#8220;functions.php&#8221; file; a CSS class on the &lt;body&gt; HTML tag, a CSS class on each post &#038; a second CSS class on every second post, a &#8220;.fix&#8221; DIV tag after every second post and forcing the homepage to include the &#8220;content-magazine-grid.php&#8221; content template file into the Canvas content templating system.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
// Add "magazine" CSS class to &lt;body&gt; tag on homepage.
add_filter( 'body_class', 'woo_custom_add_magazine_bodyclass', 12 );
function woo_custom_add_magazine_bodyclass ( $classes ) {
	if ( is_home() ) {
		$classes[] = 'magazine';
	}
	return $classes;
} // End woo_custom_add_magazine_bodyclass()

// Add "block" CSS class to each post.
add_filter( 'post_class', 'woo_custom_add_block_postclass', 12 );

function woo_custom_add_block_postclass ( $classes) {
	global $wp_query;

	$current_count = $wp_query-&gt;current_post + 1;

	if ( is_home() ) {
		$classes[] = 'block';

		if ( $current_count % 2 == 0 ) {
			$classes[] = 'last';
		} // End IF Statement
	}

	return $classes;
} // End woo_custom_add_block_postclass()

// Add the "fix" DIV tag after every second post.
add_action( 'woo_post_after', 'woo_custom_add_magazine_blockfix', 12 );

function woo_custom_add_magazine_blockfix () {
	global $wp_query;

	$current_count = $wp_query-&gt;current_post + 1;

	if ( is_home() &#038;&#038; ( $current_count % 2 == 0 ) ) {
?&gt;
&lt;div class="fix"&gt;&lt;/div&gt;&lt;!--/.fix--&gt;
&lt;?php
	} // End IF Statement
} // End woo_custom_add_magazine_blockfix()

// Make sure the "content-magazine-grid.php" file is used instead of the default "content-*.php" file.
add_filter( 'woo_template_parts', 'woo_custom_home_templatepart_magazine', 12 );

function woo_custom_home_templatepart_magazine ( $templates ) {
	if ( is_home() ) {
		$index_to_replace = count( $templates ) - 2;

		$templates[$index_to_replace] = 'content-magazine-grid.php'; // Preserve the default Canvas content templating system.

		// $templates = array( 'content-magazine-grid.php' ); // Override the content templating system entirely.
	}
	return $templates;
} // End woo_custom_home_templatepart_magazine()
</pre>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Add the &#8220;magazine&#8221; CSS class to the &lt;body&gt; HTML tag.</li>
<li>Add the &#8220;block&#8221; CSS class to each post, and the &#8220;last&#8221; CSS class to every second post.</li>
<li>After every second post, add a &#8220;.fix&#8221; DIV tag.</li>
<li>Force the homepage to include the &#8220;content-magazine-grid.php&#8221; content template file instead of &#8220;content-post-full.php&#8221; or &#8220;content-post.php&#8221;, or simply override all content template options.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_post_after&#8221; action, or other actions or filters, is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>In addition to the end result of a &#8220;Magazine&#8221;-style grid on your homepage, this is an example of how Canvas can make use of a selection of smaller filters and actions to achieve a greater result, rather than making extensive modifications to the core theme template files, or using an extensive and difficult to decipher code snippet. Through 4 short code snippets, we&#8217;ve recreated the &#8220;Magazine&#8221;-style grid and can add/remove pieces at any stage to modify the end result.</p>
<p>The final result looks something like this:</p>
<div id="attachment_13014" class="wp-caption alignnone" style="width: 610px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-home-magazinegrid.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-home-magazinegrid-600x435.png" alt="" title="The default Canvas homepage, styled as a &quot;Magazine&quot;-style grid" width="600" height="435" class="size-medium wp-image-13014" /></a><p class="wp-caption-text">The default Canvas homepage, styled as a &quot;Magazine&quot;-style grid</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/09/transform-the-default-canvas-homepage-into-a-magazine-style-grid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move the logo outside of the header in Canvas</title>
		<link>http://www.woothemes.com/2011/09/move-the-logo-outside-of-the-header-in-canvas/</link>
		<comments>http://www.woothemes.com/2011/09/move-the-logo-outside-of-the-header-in-canvas/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 11:09:38 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12948</guid>
		<description><![CDATA[In some instances, you may want to remove the custom logo in the header area entirely, move it somewhere else in the design, or add a second copy of the logo somewhere else in the layout. In this tutorial, we&#8217;ll discuss moving the Canvas custom logo option into a function that we can add where [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>In some instances, you may want to remove the custom logo in the header area entirely, move it somewhere else in the design, or add a second copy of the logo somewhere else in the layout. In this tutorial, we&#8217;ll discuss moving the Canvas custom logo option into a function that we can add where we like within the layout.</p>
<p>The modifications required for a movable logo are divided into two parts; a customised &#8220;header.php&#8221; file and a custom action in your &#8220;functions.php&#8221; file. </p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<h5>Modified header.php</h5>
<pre class="brush:php">
&lt;?php
/**
 * Header Template
 *
 * Here we setup all logic and XHTML that is required for the header section of all screens.
 *
 * @package WooFramework
 * @subpackage Template
 */

 // Setup the tag to be used for the header area (`h1` on the front page and `span` on all others).
 $heading_tag = 'span';
 if ( is_front_page() ) { $heading_tag = 'h1'; }

 // Get our website's name, description and URL. We use them several times below so lets get them once.
 $site_title = get_bloginfo( 'name' );
 $site_url = home_url( '/' );
 $site_description = get_bloginfo( 'description' );

 global $woo_options;
?&gt;&lt;!DOCTYPE html&gt;
&lt;html &lt;?php language_attributes(); ?&gt;&gt;
&lt;head&gt;
&lt;meta charset="&lt;?php bloginfo( 'charset' ); ?&gt;" /&gt;
&lt;title&gt;&lt;?php woo_title(); ?&gt;&lt;/title&gt;
&lt;?php woo_meta(); ?&gt;
&lt;link rel="stylesheet" type="text/css" href="&lt;?php bloginfo('stylesheet_url'); ?&gt;" media="all" /&gt;
&lt;link rel="pingback" href="&lt;?php bloginfo('pingback_url'); ?&gt;" /&gt;
&lt;?php if ( is_singular() ) { wp_enqueue_script( 'comment-reply' ); } ?&gt;
&lt;?php wp_head(); ?&gt;
&lt;?php woo_head(); ?&gt;
&lt;/head&gt;
&lt;body &lt;?php body_class(); ?&gt;&gt;
&lt;?php woo_top(); ?&gt;
&lt;div id="wrapper"&gt;
	&lt;?php woo_header_before(); ?&gt;

	&lt;div id="header" class="col-full"&gt;

		&lt;?php woo_header_inside(); ?&gt;

		&lt;?php if ( ( isset( $woo_options['woo_ad_top'] ) ) &#038;&#038; ( $woo_options['woo_ad_top'] == 'true' ) ) { ?&gt;
        &lt;div id="topad"&gt;

		&lt;?php if ( ( isset( $woo_options['woo_ad_top_adsense'] ) ) &#038;&#038; ( $woo_options['woo_ad_top_adsense'] != "") ) {
            echo stripslashes(get_option('woo_ad_top_adsense'));
        } else { ?&gt;
            &lt;a href="&lt;?php echo get_option('woo_ad_top_url'); ?&gt;"&gt;&lt;img src="&lt;?php echo $woo_options['woo_ad_top_image']; ?&gt;" alt="" /&gt;&lt;/a&gt;
        &lt;?php } ?&gt;		   	

        &lt;/div&gt;&lt;!-- /#topad --&gt;
        &lt;?php } ?&gt;

	&lt;/div&gt;&lt;!-- /#header --&gt;
	&lt;?php woo_header_after(); ?&gt;
</pre>
<h5>Custom action added to functions.php</h5>
<pre class="brush:php">
add_action( 'woo_header_before', 'woo_custom_add_logo', 12 );

function woo_custom_add_logo() {
	global $woo_options;

	 // Setup the tag to be used for the header area (`h1` on the front page and `span` on all others).
	 $heading_tag = 'span';
	 if ( is_front_page() ) { $heading_tag = 'h1'; }

	 // Get our website's name, description and URL. We use them several times below so lets get them once.
	 $site_title = get_bloginfo( 'name' );
	 $site_url = home_url( '/' );
	 $site_description = get_bloginfo( 'description' );
?&gt;
&lt;div id="logo"&gt;
&lt;?php
	// Website heading/logo and description text.
	if ( isset($woo_options['woo_logo']) &#038;&#038; $woo_options['woo_logo'] ) {
		echo '&lt;a href="' . $site_url . '" title="' . $site_description . '"&gt;&lt;img src="' . $woo_options['woo_logo'] . '" alt="' . $site_title . '" /&gt;&lt;/a&gt;' . "\n";
	} else {
		echo '&lt;' . $heading_tag . ' class="site-title"&gt;&lt;a href="' . $site_url . '"&gt;' . $site_title . '&lt;/a&gt;&lt;/' . $heading_tag . '&gt;' . "\n";
	} // End IF Statement

	if ( $site_description ) { echo '&lt;span class="site-description"&gt;' . $site_description . '&lt;/span&gt;' . "\n"; }
?&gt;
&lt;/div&gt;&lt;!-- /#logo --&gt;
&lt;?php
	} // End woo_custom_add_logo()
?&gt;
</pre>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>The modified &#8220;header.php&#8221; file (best added via a child theme) strips out the #logo DIV tag, and it&#8217;s contents, from the &#8220;header.php&#8221; file, to now be added via a custom action.</li>
<li>The custom action in the &#8220;functions.php&#8221; file adds the logo code back onto the screen, this time above the #header DIV tag.</li>
</ol>
<p>To add the logo in it&#8217;s original position, as well as use the filter, replace &#8220;woo_header_before&#8221; with &#8220;woo_header_inside&#8221;, as below:</p>
<pre class="brush:php">

add_action( 'woo_header_inside', 'woo_custom_add_logo', 12 );
</pre>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_header_before&#8221; action is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>The final result looks something like this:</p>
<div id="attachment_12951" class="wp-caption alignnone" style="width: 610px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-logomove-frontend.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-logomove-frontend-600x119.png" alt="" title="The Canvas Logo, Moved Above the Header" width="600" height="119" class="size-medium wp-image-12951" /></a><p class="wp-caption-text">The Canvas Logo, Moved Above the Header</p></div>
<div id="attachment_12950" class="wp-caption alignnone" style="width: 603px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-logomove-code.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-logomove-code.png" alt="" title="The Canvas Logo Code, Moved Above the Header" width="593" height="173" class="size-full wp-image-12950" /></a><p class="wp-caption-text">The Canvas Logo Code, Moved Above the Header</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/09/move-the-logo-outside-of-the-header-in-canvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a full-width footer in Canvas</title>
		<link>http://www.woothemes.com/2011/09/create-a-full-width-footer-in-canvas/</link>
		<comments>http://www.woothemes.com/2011/09/create-a-full-width-footer-in-canvas/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 10:18:19 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12657</guid>
		<description><![CDATA[On the web, some designs call for a footer section that spans the full width of the screen, while keeping the content centred on the screen (our Delicious Magazine WooTheme does this well). Despite Canvas being bundled with a fixed-width footer, it just wouldn&#8217;t be Canvas if a full-width footer wasn&#8217;t possible. In this tutorial, [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+ and WooFramework V4.5.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>On the web, some designs call for a footer section that spans the full width of the screen, while keeping the content centred on the screen (our <a href="http://www.woothemes.com/2011/02/delicious-magazine/">Delicious Magazine WooTheme</a> does this well). Despite Canvas being bundled with a fixed-width footer, it just wouldn&#8217;t be Canvas if a full-width footer wasn&#8217;t possible. In this tutorial, we&#8217;ll discuss the few small modifications we&#8217;d need to make to create a full-width footer.</p>
<p>The modifications required for a full-width footer are divided into three parts; a customised &#8220;footer.php&#8221; file, a custom action in your &#8220;functions.php&#8221; file and some CSS to take advantage of the full-width footer section. </p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<h5>Modified footer.php</h5>
<pre class="brush:php">
&lt;?php
/**
 * Footer Template
 *
 * Here we setup all logic and XHTML that is required for the footer section of all screens.
 *
 * @package WooFramework
 * @subpackage Template
 */

 global $woo_options;
?&gt;
	&lt;/div&gt;&lt;!-- /#wrapper --&gt;

	&lt;div class="fix"&gt;&lt;/div&gt;&lt;!--/.fix--&gt;

	&lt;?php wp_footer(); ?&gt;
	&lt;?php woo_foot(); ?&gt;
	&lt;/body&gt;
&lt;/html&gt;
</pre>
<h5>Custom action added to functions.php</h5>
<pre class="brush:php">
add_action( 'wp_footer', 'woo_footer_below_wrapper', 12 );

function woo_footer_below_wrapper () {
	echo '&lt;div id="footer-widgets-container"&gt;';
		woo_footer_top();
	echo '&lt;/div&gt;';

 	woo_footer_before();
?&gt;
&lt;div id="footer-container"&gt;
	&lt;div id="footer" class="col-full"&gt;
	&lt;?php woo_footer_inside(); ?&gt;
		&lt;div id="copyright" class="col-left"&gt;
			&lt;?php woo_footer_left(); ?&gt;
		&lt;/div&gt;

		&lt;div id="credit" class="col-right"&gt;
			&lt;?php woo_footer_right(); ?&gt;
		&lt;/div&gt;
	&lt;/div&gt;&lt;!--/#footer--&gt;
&lt;/div>&lt;!--/#footer-container--&gt;
&lt;?php
 	woo_footer_after();
} // End woo_footer_below_wrapper()
</pre>
<h5>Example CSS</h5>
<p>This CSS adds a background colour that now spans the full width of the screen. This would be customised to suit the design of your website. This should be placed either in the &#8220;custom.css&#8221; file or the &#8220;Custom CSS&#8221; theme option.</p>
<pre class="brush:php">

#footer-container, #footer-widgets-container { background: #EDEDED; }
</pre>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>The modified &#8220;footer.php&#8221; file (best added via a child theme) strips out the main content of the &#8220;footer.php&#8221; file, to now be added via a custom action.</li>
<li>The custom action in the &#8220;functions.php&#8221; file adds the footer code back onto the screen, this time below the closing #wrapper DIV tag, allowing us to change the width.</li>
<li>Add a #footer-container DIV tag, to enable additional styling possibilities.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;wp_footer&#8221; action is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>The final result looks something like this:</p>
<div id="attachment_12659" class="wp-caption alignnone" style="width: 610px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-footer-fullwidth.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-footer-fullwidth-600x287.png" alt="" title="Full-width footer in Canvas" width="600" height="287" class="size-medium wp-image-12659" /></a><p class="wp-caption-text">Full-width footer in Canvas</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/09/create-a-full-width-footer-in-canvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display page content below the featured slider on the &#8220;Magazine&#8221; page template</title>
		<link>http://www.woothemes.com/2011/09/display-page-content-on-the-magazine-page-template/</link>
		<comments>http://www.woothemes.com/2011/09/display-page-content-on-the-magazine-page-template/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 09:09:57 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12647</guid>
		<description><![CDATA[The &#8220;Magazine&#8221; page template displays your posts in both a featured image slider and a magazine-style grid, providing a magazine look and feel to your content. As this is a page template, we can see that the page&#8217;s content isn&#8217;t displayed, in favour of the posts. In some instances, it can be useful to display [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+ and WooFramework V4.5.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>The &#8220;Magazine&#8221; page template displays your posts in both a featured image slider and a magazine-style grid, providing a magazine look and feel to your content. As this is a page template, we can see that the page&#8217;s content isn&#8217;t displayed, in favour of the posts. In some instances, it can be useful to display the content of the page with the &#8220;Magazine&#8221; page template, as well as your blog posts. In this tutorial, we&#8217;ll discuss displaying the page&#8217;s content of that page&#8217;s WYSIWYG content field below the featured slider on the &#8220;Magazine&#8221; page template.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
add_action( 'get_template_part_loop', 'woo_custom_display_page_content', 10, 2 );

	function woo_custom_display_page_content ( $slug, $name ) {
		if ( $name != 'magazine' ) { return; }
			wp_reset_query();
			global $post;
			setup_postdata( $post );
?&gt;
	&lt;div &lt;?php post_class( 'post' ); ?&gt;&gt;
	&lt;?php the_content(); ?&gt;
	&lt;/div&gt;&lt;!--/.post--&gt;
&lt;?php
	} // End woo_custom_display_page_content()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Instruct the &#8220;get_template_part_loop&#8221; action to find and execute the &#8220;woo_custom_display_page_content()&#8221; function, at priority setting &#8220;10&#8243; with &#8220;2&#8243; parameters (the $slug and $name of the template part).</li>
<li>If the $name variable is &#8220;magazine&#8221;, we&#8217;re not on the &#8220;Magazine&#8221; page template, don&#8217;t run the custom code.</li>
<li>Reset the current WordPress database query to the default, setup the data for the current page and display it&#8217;s content using &#8220;the_content()&#8221; inside a DIV tag with the CSS class of &#8220;post&#8221;, along with the default CSS classes added by WordPress.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;get_template_part_loop&#8221; action is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>The final result looks something like this:</p>
<div id="attachment_12650" class="wp-caption alignnone" style="width: 610px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-magazine-pagecontent.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-magazine-pagecontent-600x671.png" alt="" title="Page content, displayed below the featured slider on the &quot;Magazine&quot; page template" width="600" height="671" class="size-medium wp-image-12650" /></a><p class="wp-caption-text">Page content, displayed below the featured slider on the &quot;Magazine&quot; page template</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/09/display-page-content-on-the-magazine-page-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add the &#8220;Magazine&#8221; slider to the default homepage</title>
		<link>http://www.woothemes.com/2011/09/add-the-magazine-slider-to-the-default-homepage/</link>
		<comments>http://www.woothemes.com/2011/09/add-the-magazine-slider-to-the-default-homepage/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 08:06:17 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12638</guid>
		<description><![CDATA[The &#8220;Magazine&#8221; slider and page template are an ideal way to feature specific posts in an image slider and, if using the page template, display other posts in a magazine-style grid. In certain instances, you may want the &#8220;Magazine&#8221; slider and not the posts grid below. In this tutorial, we&#8217;ll discuss how it is in [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+ and WooFramework V4.5.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>The &#8220;Magazine&#8221; slider and page template are an ideal way to feature specific posts in an image slider and, if using the page template, display other posts in a magazine-style grid. In certain instances, you may want the &#8220;Magazine&#8221; slider and not the posts grid below. In this tutorial, we&#8217;ll discuss how it is in fact possible to have one&#8217;s cake and eat it, in this context, by adding the &#8220;Magazine&#8221; slider to the default &#8220;Your Latest Posts&#8221; homepage.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
add_action( 'woo_loop_before_home', 'woo_slider_magazine', 10 );
add_action( 'woo_loop_before_home', 'woo_custom_reset_query', 11 );
add_action( 'woo_load_slider_js', '__return_true', 10 );
add_filter( 'body_class', 'woo_custom_add_magazine_bodyclass', 10 );

function woo_custom_add_magazine_bodyclass ( $classes ) {
	if ( is_home() ) {
		$classes[] = 'magazine';
	}
	return $classes;
} // End woo_custom_add_magazine_bodyclass()

function woo_custom_reset_query () {
	wp_reset_query();
} // End woo_custom_reset_query()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Load the &#8220;Magazine&#8221; slider before the loop on the homepage.</li>
<li>Instruct the &#8220;Magazine&#8221; slider JavaScript to load.</li>
<li>Add the &#8220;magazine&#8221; CSS class to the &lt;body&gt; tag to keep the &#8220;Magazine&#8221; slider&#8217;s styling.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_loop_before&#8221; action or &#8220;woo_load_slider_js&#8221; filter is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>The final result looks something like this:</p>
<div id="attachment_12640" class="wp-caption alignnone" style="width: 610px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-magazineslider-home-600x623.png" alt="" title="The &quot;Magazine&quot; slider, above the blog posts on the default &quot;Your Latest Posts&quot; homepage" width="600" height="623" class="size-medium wp-image-12640" /><p class="wp-caption-text">The &quot;Magazine&quot; slider, above the blog posts on the default &quot;Your Latest Posts&quot; homepage</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/09/add-the-magazine-slider-to-the-default-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add custom links to the breadcrumb trail on single blog posts</title>
		<link>http://www.woothemes.com/2011/09/add-custom-links-to-the-breadcrumb-trail-on-single-blog-posts/</link>
		<comments>http://www.woothemes.com/2011/09/add-custom-links-to-the-breadcrumb-trail-on-single-blog-posts/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 13:09:09 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12611</guid>
		<description><![CDATA[The woo_breadcrumbs() functionality, bundled with the WooFramework, provides ease and flexibility when displaying breadcrumbs on your website. In this tutorial, we&#8217;ll discuss adding a link to a WordPress Page into the breadcrumb on all single blog post screens. The finished code Before we start, lets take a look at the finished code. add_filter( 'woo_breadcrumbs_trail', 'woo_custom_breadcrumbs_trail_single', [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+ and WooFramework V4.5.1+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>The woo_breadcrumbs() functionality, bundled with the WooFramework, provides ease and flexibility when displaying breadcrumbs on your website. In this tutorial, we&#8217;ll discuss adding a link to a WordPress Page into the breadcrumb on all single blog post screens.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
add_filter( 'woo_breadcrumbs_trail', 'woo_custom_breadcrumbs_trail_single', 10, 1 );

function woo_custom_breadcrumbs_trail_single ( $trail ) {
	if ( is_single() &#038;&#038; ( get_post_type() == 'post' ) ) {
		// The ID of the page you want to add to the breadcrumb. Replace this with your own.
		$page_id = 2;

		// Get the page's title and permalink, and group them in an HTML anchor tag.
		$title = get_the_title( $page_id );
		$permalink = get_permalink( $page_id );
		$page_link = '&lt;a href="' . $permalink . '" title="' . esc_attr( $title ) . '"&gt;' . $title . '&lt;/a&gt;';

		// Add the new page link, and the original trail's end, back into the trail.
		array_splice( $trail, 1, count( $trail ) - 1, array( $page_link, $trail['trail_end'] ) );
	} // End IF Statement

	return $trail;
} // End woo_custom_breadcrumbs_trail_single()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Instruct the &#8220;woo_breadcrumbs_trail&#8221; filter to look for and execute the &#8220;woo_custom_breadcrumbs_trail_single()&#8221; function.</li>
<li>Specify the ID of the WordPress page we want to add to the breadcrumb, and get the title and permalink for that page. Construct an HTML anchor tag, using the page&#8217;s title and permalink.</li>
<li>Add the new permalink, along with the original trail ending text, to the end of the breadcrumb trail.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_breadcrumbs_trail&#8221; filter is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>The final result looks something like this:</p>
<div id="attachment_12613" class="wp-caption alignnone" style="width: 331px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/09/canvas-breadcrumbs-customlink.png" alt="" title="A custom link to the &quot;About&quot; page on a single blog post&#039;s breadcrumb trail" width="321" height="28" class="size-full wp-image-12613" /><p class="wp-caption-text">A custom link to the &quot;About&quot; page on a single blog post&#039;s breadcrumb trail</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/09/add-custom-links-to-the-breadcrumb-trail-on-single-blog-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customising the footer content on Different Pages</title>
		<link>http://www.woothemes.com/2011/08/customising-canvas-footer-content-for-different-pages/</link>
		<comments>http://www.woothemes.com/2011/08/customising-canvas-footer-content-for-different-pages/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 13:38:51 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12511</guid>
		<description><![CDATA[Today&#8217;s tutorial involves techniques we&#8217;ve learned across earlier tutorials, involving the use of custom filters. Today, we&#8217;ll be applying this technique again for a different purpose- to customise the footer content for certain, specific pages. The finished code Before we start, lets take a look at the finished code. add_filter( 'woo_footer_left', 'woo_custom_footer_left', 20 ); add_filter( [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>Today&#8217;s tutorial involves techniques we&#8217;ve learned across earlier tutorials, involving the use of custom filters. Today, we&#8217;ll be applying this technique again for a different purpose- to customise the footer content for certain, specific pages.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
add_filter( 'woo_footer_left', 'woo_custom_footer_left', 20 );
add_filter( 'woo_footer_left', 'wpautop', 21 );

function woo_custom_footer_left ( $content ) {
	// Add the slugs here of the pages you want to customise the footer of.
	$pages = array( 'about', 'contact', 'blog' );

	foreach ( $pages as $p ) {
		if ( is_page( $p ) ) {

			// Calling the __( '', 'woothemes' ) function here makes this text translatable.
			$content = __( 'This is our customised footer.', 'woothemes' );
			break;
		}
	}

	return $content;
} // End woo_custom_footer_left()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<div class="woo-sc-box info   ">The last setting, `20`, is the priority setting. Adding multiple filters to the same filter point and changing this priority value allows you to control the order in which your custom functions are executed. We set this at `20` to make sure the default code has already done it&#8217;s work before we execute our custom code.</div>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Instruct the &#8220;woo_footer_left&#8221; filter to look for and execute the &#8220;woo_custom_footer_left()&#8221; function on the footer left content area.</li>
<li>Setup an array of pages for which we want to customise the footer.</li>
<li>Loop through the array and, when we reach the page we&#8217;re on, change the content and break out of the loop (as we&#8217;ve found the page we&#8217;re looking to customise the footer for).</li>
<li>Make sure we run the `wpautop` function on the text after we&#8217;ve customised it, to make sure the paragraph tags are in place correctly.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_footer_left&#8221; filter hook is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<h4>A different application for this code</h4>
<p>What if you want a custom footer for a different condition (all posts, perhaps)? WordPress contains several <a href="http://codex.wordpress.org/Conditional_Tags">Conditional Tags</a> which can be used to determine when do display content or perform specific actions. In this case, we only want to change the footer text on single blog posts, so we use the `is_single()` conditional tag. The adjusted code would look like this:</p>
<pre class="brush:php">
add_filter( 'woo_footer_left', 'woo_custom_footer_left_single', 20 );
add_filter( 'woo_footer_left', 'wpautop', 21 );

function woo_custom_footer_left_single ( $content ) {
	if ( is_single() ) {

		// Calling the __( '', 'woothemes' ) function here makes this text translatable.
		$content = __( 'This is our customised footer for all single posts.', 'woothemes' );
	}

	return $content;
} // End woo_custom_footer_left_single()
</pre>
<p>The final results look something like this:</p>
<div id="attachment_12513" class="wp-caption alignnone" style="width: 263px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-customfooter-base.png" alt="" title="The Canvas Footer, Customised for a Specific Page" width="253" height="82" class="size-full wp-image-12513" /><p class="wp-caption-text">The Canvas Footer, Customised for a Specific Page</p></div>
<div id="attachment_12514" class="wp-caption alignnone" style="width: 365px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-customfooter-singleposts.png" alt="" title="The Canvas Footer, Customised for all Blog Posts" width="355" height="72" class="size-full wp-image-12514" /><p class="wp-caption-text">The Canvas Footer, Customised for all Blog Posts</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/08/customising-canvas-footer-content-for-different-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add search details to the search results list</title>
		<link>http://www.woothemes.com/2011/08/add-search-details-to-the-search-results-list/</link>
		<comments>http://www.woothemes.com/2011/08/add-search-details-to-the-search-results-list/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 12:37:23 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12340</guid>
		<description><![CDATA[When searching a website, it&#8217;s often useful to know where in the search results list you&#8217;re currently browsing, and how many results, if any, have been found for your search. In this tutorial, we&#8217;ll be using a contextual hook to display these search details on the search results list. The finished code Before we start, [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>When searching a website, it&#8217;s often useful to know where in the search results list you&#8217;re currently browsing, and how many results, if any, have been found for your search. In this tutorial, we&#8217;ll be using a contextual hook to display these search details on the search results list.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
add_action( 'woo_loop_before_search', 'woo_custom_search_info', 10 );

function woo_custom_search_info () {
	global $wp_query;

	// Retrieve the values we need to work out which items we're displaying.
	$per_page = $wp_query-&gt;query_vars['posts_per_page'];
	$paged = $wp_query-&gt;query_vars['paged'];
	$past_pages = 0;
	if ( $paged &gt; 0 ) { $past_pages = $paged - 1; }
	$post_count = $wp_query-&gt;post_count;
	$total = $wp_query-&gt;found_posts;

	if ( $total == 0 ) { return; }

	// Setup the start and end values.
	$processed_entries = $per_page * $past_pages;
	$start = $processed_entries + 1;
	$end = $processed_entries + $post_count;

	// Setup our information for display as HTML.
	$html = '';

	$html .= '&lt;div id="search-details" class="search-details"&gt;' . "\n";
		$html .= __( 'Displaying', 'woothemes' ) . ' ';

	if ( $total == 1 ) {

		$html .= '&lt;strong&gt;' . $total . '&lt;/strong&gt; ' . __( 'result', 'woothemes' );

	} else {

		$html .= sprintf( __( '%1$s to %2$s of %3$s results', 'woothemes' ), '&lt;strong&gt;' . $start . '&lt;/strong&gt;', '&lt;strong&gt;' . $end . '&lt;/strong&gt;', '&lt;strong&gt;' . $total . '&lt;/strong&gt;' );

	}

	$html .= ' ' . __( 'for', 'woothemes' ) . ' &lt;strong&gt;"' . get_search_query() . '"&lt;/strong&gt;' . "\n";

	$html .= '&lt;/div>&lt;!--/#search-details .search-details--&gt;' . "\n";

	// Display the finished HTML.
	echo $html;
} // End woo_custom_search_info()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<h4>What the code does</h4>
<p>Right. That&#8217;s quite a lot of code to take in with a single read. Lets take a look at what it does.</p>
<p>The above code does the following:</p>
<ol>
<li>Instruct the &#8220;woo_loop_before_search&#8221; hook to look for and execute the &#8220;woo_custom_search_info()&#8221; function. &#8220;woo_loop_before&#8221; is the main hook. Adding &#8220;_search&#8221; to the end ensures that it only executes on the &#8220;search&#8221; screen.</li>
<li>Retrieve the necessary values from the current screen&#8217;s &#8220;$wp_query&#8221; object and determine the total number of results, current start and current end numbers.</li>
<li>If there are no results, stop the code and don&#8217;t display any text.</li>
<li>Setup a wrapping DIV tag with an ID of &#8220;search-details&#8221; and CSS class of &#8220;search-details&#8221;, setup our text starting point (&#8220;Displaying&#8221;) and load it inside the new DIV tag.</li>
<li>If there&#8217;s only a single result, display &#8220;1 result&#8221;, otherwise display the start, end and total number of results inside the new DIV tag.</li>
<li>Print out (echo) the new HTML to the screen.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_loop_before_search&#8221; action hook is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<h4>Lastly, the CSS</h4>
<p>Lastly, we&#8217;ll add some CSS to the `custom.css` file to give the search details some space before the results list starts.</p>
<pre class="brush:php">
.search-details { margin-bottom: 20px; }
</pre>
<p>The final result should look something like this:</p>
<div id="attachment_12342" class="wp-caption alignnone" style="width: 284px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-searchdetails-final.png" alt="" title="Search details added to the Canvas search results screen" width="274" height="24" class="size-full wp-image-12342" /><p class="wp-caption-text">Search details added to the Canvas search results screen</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/08/add-search-details-to-the-search-results-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving the page title outside of the content area</title>
		<link>http://www.woothemes.com/2011/08/moving-the-single-page-title-in-canvas/</link>
		<comments>http://www.woothemes.com/2011/08/moving-the-single-page-title-in-canvas/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 13:28:09 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12329</guid>
		<description><![CDATA[Sometimes, you may want to move a page&#8217;s title to another part of the page&#8217;s layout. This may be for CSS styling reasons, or simply because you prefer it there. Today, we&#8217;ll look into how we can achieve this in Canvas. What we&#8217;ll be doing here is: Disabling the original title. Adding a new title [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>Sometimes, you may want to move a page&#8217;s title to another part of the page&#8217;s layout. This may be for CSS styling reasons, or simply because you prefer it there. Today, we&#8217;ll look into how we can achieve this in Canvas.</p>
<p>What we&#8217;ll be doing here is:</p>
<ol>
<li>Disabling the original title.</li>
<li>Adding a new title in our desired location.</li>
</ol>
<p>The default position of the page title looks as follows:</p>
<div id="attachment_12331" class="wp-caption alignnone" style="width: 333px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-movepagetitle-before.png" alt="" title="The default page title position in Canvas" width="323" height="329" class="size-full wp-image-12331" /><p class="wp-caption-text">The default page title position in Canvas</p></div>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
add_filter( 'the_title', 'woo_custom_hide_single_page_title', 10 );

function woo_custom_hide_single_page_title ( $title ) {
	if ( is_page() &#038;&#038; in_the_loop() ) { $title = ''; }

	return $title;
} // End woo_custom_hide_single_page_title()

add_action( 'woo_content_before_singular-page', 'woo_custom_add_page_title', 10 );

function woo_custom_add_page_title () {
	global $post;
	$title = '&lt;h1 class="title"&gt;' . get_the_title( $post->ID ) . '&lt;/h1&gt;' . "\n";
	echo $title;
} // End woo_custom_add_page_title()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<h4>What the code does</h4>
<p>As can be seen above, we&#8217;ve got two custom functions, a filter and an action.</p>
<p>The above code does the following:</p>
<ol>
<li>Run a custom filter on &#8220;the_title&#8221;. If it&#8217;s being used on a single page and is in The Loop, disable it.</li>
<li>Add a custom action on &#8220;woo_content_before&#8221; (only in the &#8220;singular-page&#8221; context) and display the title text, wrapped in &#8220;h1&#8243; tags.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_content_before_singular-page&#8221; action hook is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<p>The final result should look something like this:</p>
<div id="attachment_12333" class="wp-caption alignnone" style="width: 298px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-movepagetitle-after.png" alt="" title="The page title outside of the Canvas content area" width="288" height="346" class="size-full wp-image-12333" /><p class="wp-caption-text">The page title outside of the Canvas content area</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/08/moving-the-single-page-title-in-canvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a search box to the header in Canvas</title>
		<link>http://www.woothemes.com/2011/08/adding-a-search-box-to-the-canvas-header/</link>
		<comments>http://www.woothemes.com/2011/08/adding-a-search-box-to-the-canvas-header/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 08:53:39 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12309</guid>
		<description><![CDATA[The WordPress search functionality is a useful way of helping your users find the specific content they&#8217;re looking for. Knowing that the searching functionality is in place, the main focus would then be on making the search box as visible to your visitors as possible. Therefore, why not add the search box in your website&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>The WordPress search functionality is a useful way of helping your users find the specific content they&#8217;re looking for. Knowing that the searching functionality is in place, the main focus would then be on making the search box as visible to your visitors as possible. Therefore, why not add the search box in your website&#8217;s header area? This is what we&#8217;ll be adding to Canvas in today&#8217;s tutorial.</p>
<h4>The finished code</h4>
<p>Before we start, lets take a look at the finished code.</p>
<pre class="brush:php">
add_action( 'woo_header_inside', 'woo_custom_add_searchform', 10 );

function woo_custom_add_searchform () {
	echo '&lt;div id="header-search" class="header-search fr"&gt;' . "\n";
	get_template_part( 'search', 'form' );
	echo '&lt;/div&gt;&lt;!--/#header-search .header-search fr--&gt;' . "\n";
} // End woo_custom_add_searchform()
</pre>
<div class="woo-sc-box info   ">This code would be placed in your Canvas or child theme&#8217;s &#8220;functions.php&#8221; file.</div>
<h4>What the code does</h4>
<p>The above code does the following:</p>
<ol>
<li>Instruct the &#8220;woo_header_inside&#8221; hook to look for and execute the &#8220;woo_custom_add_searchform()&#8221; function.</li>
<li>Setup a wrapping DIV tag with an ID of &#8220;header-search&#8221; and CSS classes of &#8220;header-search&#8221; and &#8220;fr&#8221; (float right), get the template part called search-form.php and load it inside the new DIV tag.</li>
</ol>
<div class="woo-sc-box note   ">If the use of the &#8220;woo_header_inside&#8221; action hook is confusing, please see our tutorial on <a href="http://www.woothemes.com/2011/05/canvas-using-hooks-and-filters/">using hooks and filters in Canvas</a>.</div>
<h4>Lastly, the CSS</h4>
<p>Lastly, we&#8217;ll add some CSS to the `custom.css` file to vertically centre the search box within the header (the value used here would differ depending on your header&#8217;s height).</p>
<pre class="brush:php">
.header-search { position: relative; top: 20px; }
</pre>
<p>The final result looks something like this:</p>
<div id="attachment_12311" class="wp-caption alignnone" style="width: 610px"><a href="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-headersearch-final.png"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-headersearch-final-600x77.png" alt="" title="A search box in the Canvas header" width="600" height="77" class="size-medium wp-image-12311" /></a><p class="wp-caption-text">A search box in the Canvas header</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/08/adding-a-search-box-to-the-canvas-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add a description below each Navigation Menu Item</title>
		<link>http://www.woothemes.com/2011/08/add-a-description-below-each-navigation-menu-item/</link>
		<comments>http://www.woothemes.com/2011/08/add-a-description-below-each-navigation-menu-item/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 11:00:17 +0000</pubDate>
		<dc:creator>Matty Cohen</dc:creator>
				<category><![CDATA[Canvas]]></category>

		<guid isPermaLink="false">http://www.woothemes.com/?p=12250</guid>
		<description><![CDATA[In some navigation systems, you may want to display a short description of the content of each navigation item, below the link. This can be seen in Adii&#8217;s blog redesign, where each navigation item has a short description below it. The WordPress Menus navigation manager (originally WooNav) has a neat &#8220;description&#8221; field bundled in. In [...]]]></description>
			<content:encoded><![CDATA[<div class="woo-sc-box info   ">Minimum Requirements: Canvas V4.0+</div>
<div class="woo-sc-box note   ">Keep the <a href="http://www.woothemes.com/woocodex/canvas-hookfilter-reference/">Canvas Hook/Filter Reference</a> on hand, as it will come in handy using the techniques explained below.</div>
<p>In some navigation systems, you may want to display a short description of the content of each navigation item, below the link. This can be seen in <a href="http://adii.me/">Adii&#8217;s blog redesign</a>, where each navigation item has a short description below it. The WordPress Menus navigation manager (originally WooNav) has a neat &#8220;description&#8221; field bundled in. In this tutorial, we&#8217;ll make use of this field to display a short description below each navigation item.</p>
<div id="attachment_12254" class="wp-caption alignnone" style="width: 610px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-navdesc-reference-600x70.png" alt="" title="Adii&#039;s blog navigation" width="600" height="70" class="size-medium wp-image-12254" /><p class="wp-caption-text">Adii&#039;s blog navigation</p></div>
<p>To do this, we&#8217;ll need to do the following:</p>
<ol>
<li>Enable the &#8220;Description&#8221; field.</li>
<li>Add text to the &#8220;Description&#8221; field for <strong>each and every</strong> navigation item on the top level of our navigation.</li>
<li>Tell WordPress to add this description text below each navigation item&#8217;s link.</li>
<li>Add some CSS to style the description text.</li>
</ol>
<h4>Enable the &#8220;Description&#8221; field</h4>
<p>To do this, we open the &#8220;Screen Options&#8221; tab in the top-right corner of the &#8220;Appearance -> Menus&#8221; screen and check the checkbox next to &#8220;Description&#8221;. No code required.</p>
<div id="attachment_12255" class="wp-caption alignnone" style="width: 610px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-navdesc-screenoptions-600x113.png" alt="" title="Enable the &quot;Description&quot; field under the &quot;Screen Options&quot; tab" width="600" height="113" class="size-medium wp-image-12255" /><p class="wp-caption-text">Enable the &quot;Description&quot; field under the &quot;Screen Options&quot; tab</p></div>
<h4>Add description text to each item.</h4>
<p>Now that we&#8217;ve enabled the &#8220;Description&#8221; field, if we click the &#8220;down&#8221; arrow next to each navigation item, we should see a next textarea field labelled &#8220;Description&#8221;. This field may have post/page content in it already, depending on if the item is a post or page. If it has content in it already, this is WordPress&#8217; way of compensating for potentially empty descriptions. Please delete this text and replace it with your own.</p>
<div id="attachment_12252" class="wp-caption alignnone" style="width: 434px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-navdesc-description.png" alt="" title="Adding a &quot;Description&quot; to a navigation item" width="424" height="368" class="size-full wp-image-12252" /><p class="wp-caption-text">Adding a &quot;Description&quot; to a navigation item</p></div>
<div class="woo-sc-box note   ">If the navigation item is a page or post, that entry&#8217;s content will be added to the &#8220;Description&#8221; field by default, which we don&#8217;t want. Therefore, you&#8217;d need to add a description to each top-level navigation item.</div>
<h4>Tell WordPress to add the &#8220;Description&#8221; text to the navigation items on the top-level</h4>
<p>This is where the code comes into the picture. It&#8217;s a short function, added <a href="http://www.woothemes.com/2011/07/customising-post-meta-using-custom-filters/">using a filter</a>. We&#8217;ll add this code to the <strong>functions.php</strong> file.</p>
<p>The finished code snippet is as follows:</p>
<pre class="brush:php">
add_filter( 'walker_nav_menu_start_el', 'woo_custom_nav_menu_start_el', 10, 4 );

function woo_custom_nav_menu_start_el( $item_output, $item, $depth, $args ) {

	if ( $args->theme_location == 'primary-menu' ) {
		$description  = '';
		if ( ! empty( $item->description ) &#038;&#038; ( $depth == 0 ) ) {
			$description = '<span class="description">' . esc_attr( $item->description ) . '</span>';
		}

		// Get the description to sit inside the anchor tag.
		$item_output = str_replace( '&lt;/a&gt;', $description . '&lt;/a&gt;', $item_output );
	}

	return $item_output;
} // End woo_custom_nav_menu_start_el()
</pre>
<p>Currently, the above snippet has been coded to target the &#8220;primary-menu&#8221; theme location specifically. This can be changed to target any theme location you desire.</p>
<p>The description text is also placed within the anchor tag, to ensure that there is no gap between the anchor and any dropdown menus present on that navigation item. Adding the description below the anchor creates a gap between the navigation item and the dropdown menu.</p>
<p>Also, don&#8217;t forget to assign the menu to the appropriate theme location, if it isn&#8217;t already, as explained in our tutorial on <a href="http://www.woothemes.com/2011/08/adding-custom-navigation-menus-in-canvas/">adding custom navigation menus to Canvas</a>.</p>
<div id="attachment_12256" class="wp-caption alignnone" style="width: 303px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-navdesc-themelocation.png" alt="" title="Assign your menu to the appropriate Theme Location" width="293" height="251" class="size-full wp-image-12256" /><p class="wp-caption-text">Assign your menu to the appropriate Theme Location</p></div>
<h4>Lastly, the CSS</h4>
<p>Lastly, we&#8217;ll add some CSS to the `custom.css` file to make sure the description text displays neatly to start with.</p>
<pre class="brush:php">
.nav .description { display: block; font-size: 11px; font-style: italic; }
</pre>
<p>The final result, combining the above steps, should look something like this:</p>
<div id="attachment_12253" class="wp-caption alignnone" style="width: 487px"><img src="http://cdn.woothemes.com/wp-content/uploads/2011/08/canvas-navdesc-final.png" alt="" title="Descriptions under navigation items in Canvas" width="477" height="162" class="size-full wp-image-12253" /><p class="wp-caption-text">Descriptions under navigation items in Canvas</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.woothemes.com/2011/08/add-a-description-below-each-navigation-menu-item/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc (Feed is rejected)
Object Caching 828/997 objects using apc
Content Delivery Network via cdn.woothemes.com

Served from: www.woothemes.com @ 2012-02-11 07:39:11 -->
