<?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>Webstractions Web Development &#187; functions.php</title>
	<atom:link href="http://webstractions.com/tag/functionsphp/feed/" rel="self" type="application/rss+xml" />
	<link>http://webstractions.com</link>
	<description>Abstract thoughts in web design and development.</description>
	<lastBuildDate>Wed, 02 Mar 2011 12:22:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>How to remove inline Recent Comments style from WordPress</title>
		<link>http://webstractions.com/wordpress/remove-recent-comments-inline-styl/</link>
		<comments>http://webstractions.com/wordpress/remove-recent-comments-inline-styl/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 21:30:09 +0000</pubDate>
		<dc:creator>Ronnie T. Dodger</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[add_filter]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[inline style]]></category>
		<category><![CDATA[recent comments]]></category>
		<category><![CDATA[remove_filter]]></category>
		<category><![CDATA[wordpress function]]></category>

		<guid isPermaLink="false">http://webstractions.com/?p=175</guid>
		<description><![CDATA[Have you found an inline style in your Html head section for WordPress's Recent Comments widget? Wonder where it came from? Do you want to know how to get rid of it? Learn how to write a WordPress filter to remove a filter.]]></description>
			<content:encoded><![CDATA[<p><img src="http://webstractions.com/blog/wp-content/uploads/2009/03/ss-recentcomments-e1284729466312.jpg" alt=".recent_comments style block in Html Head section" title="ss-recentcomments" width="602" height="138" class="alignright size-full wp-image-233" /></p>
<p>Have you seen the following code inside the <kbd>HEAD</kbd> section of your WordPress blog source code? </p>
<pre name="code" class="php">
<style type="text/css">.recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}</style>
</pre>
<p>Ever wonder how it got there, and how to get rid of it?</p>
<p>The inline style gets injected into the head section when you use the Recent Comments widget. The widget applies a filter to wp_head() when it is activated. </p>
<p>In order to get rid of the inline style, short of modifying the core file (not advised), is to apply a filter of our own. Let&#8217;s get to work on that.</p>
<h2>Move the styling to your theme <strong>style.css</strong> file</h2>
<p>Copy the following code to your theme css file:</p>
<pre  name="code" class="php">.recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}
</pre>
<p>Once you have the code inside your style.css file, you can edit it to your hearts content. </p>
<h2>Add a filter to remove a filter (Pre 2.8)</h2>
<p class="note">The wp_head filter for wp_widget_recent_comments_style was dropped in WordPress 2.8, and was renamed to recent_comments_style. Why it was not removed altogether is a mystery.</p>
<p>Yep, seems a little crazy, but we are going to add a filter to remove the stock WordPress filter. </p>
<p>Add the following to your theme <strong>functions.php</strong> file:</p>
<pre  name="code" class="php">
function remove_wp_widget_recent_comments_style() {
   if ( has_filter('wp_head', 'wp_widget_recent_comments_style') ) {
      remove_filter('wp_head', 'wp_widget_recent_comments_style' );
   }
}
add_filter( 'wp_head', 'remove_wp_widget_recent_comments_style', 1 );
</pre>
<p>Here we are adding a filter via the WordPress add_filter() method. The first argument, <kbd>wp_head</kbd>, which is the <em>hook</em> where the style filter gets applied in the first place.</p>
<p style="clear:all;">The second argument is the callback to our custom filter, <kbd>remove_wp_widget_recent_comments_style()</kbd>.</p>
<p>The third parameter is the priority of when our filter will get processed. We are setting this to 1 to insure that it takes priority over the WordPress core function. If this argument is too higher of a number, then we run the risk of our filter not taking precedence. </p>
<p>Our custom filter is simple, it first checks to see if the WordPress filter is present. If it is present, then we simply remove the filter. The <kbd>remove_filter()</kbd> function takes the same arguments as <kbd>add_filter()</kbd></p>
<h2>Add an action to remove an action (2.9.1 and on)</h2>
<p>After reading later comments that were recently posted, it became clear that later versions of WordPress caused the original filter fix above not to work. Investigation reveals that the original filter was dropped in 2.8, renamed and is now an action that fires during widgets_init. </p>
<p>Why they did not just drop this altogether is a mystery. It is something that should be handled via a stylesheet. In fact, if you look at the TwentyTen theme that comes with the later versions of WordPress 3.0 and on, you will find that theme addresses this issue with the following snippet of code in their functions.php file:</p>
<pre name="code" class="php">
function twentyten_remove_recent_comments_style() {
	global $wp_widget_factory;
	remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
}
add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
</pre>
<p>Drop this code into your functions.php file and the styling will be removed from your Head section. </p>
<p>The history of this snippet was originally suggested by <a href="http://twitter.com/nacin" rel="nofollow">Andrew Nacin</a> in a comment to a <a href="http://core.trac.wordpress.org/ticket/11928">bug</a> that <a href="http://beerpla.net/">Artem Russakovskii</a> opened up in the WordPress tracker. Artem&#8217;s <a href="http://beerpla.net/2010/01/31/how-to-remove-inline-hardcoded-recent-comments-sidebar-widget-style-from-your-wordpress-theme/">solution</a> for removing the inline style for the Recent Comments is exactly the same as what the TwentyTen theme uses. </p>
<p>What is odd with this whole thing is that the styling disappeared for a short while during 2.8 and magically showed up in 2.9.1.  </p>
<h2>Some thoughts</h2>
<p>While the inline style does not hurt anything, some purists just hate seeing it there in the first place. It is one of those quirky things that WordPress code does to you.</p>
<p>The <kbd>remove_filter()</kbd> WordPress function can come in handy for other things that bug the heck out of you. One example would be the curly quotes that replace normal quotes inside of your posts and pages. </p>
<p>You can remove the <kbd>wptexturize</kbd> filter from any of the following hooks for example:</p>
<pre  name="code" class="php">
remove_filter('category_description', 'wptexturize');
remove_filter('list_cats', 'wptexturize');
remove_filter('comment_author', 'wptexturize');
remove_filter('comment_text', 'wptexturize');
remove_filter('single_post_title', 'wptexturize');
remove_filter('the_title', 'wptexturize');
remove_filter('the_content', 'wptexturize');
remove_filter('the_excerpt', 'wptexturize');
</pre>
<p>You can think of <kbd>remove_filter</kbd> is to WordPress, as reset.css is to style sheets. Wonderful world it is.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+remove+inline+Recent+Comments+style+from+WordPress&amp;link=http://webstractions.com/wordpress/remove-recent-comments-inline-styl/&amp;notes=Have%20you%20found%20an%20inline%20style%20in%20your%20Html%20head%20section%20for%20WordPress%27s%20Recent%20Comments%20widget%3F%20Wonder%20where%20it%20came%20from%3F%20Do%20you%20want%20to%20know%20how%20to%20get%20rid%20of%20it%3F%20Learn%20how%20to%20write%20a%20WordPress%20filter%20to%20remove%20a%20filter.&amp;short_link=http://b2l.me/ap3v4x&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+remove+inline+Recent+Comments+style+from+WordPress&amp;link=http://webstractions.com/wordpress/remove-recent-comments-inline-styl/&amp;notes=Have%20you%20found%20an%20inline%20style%20in%20your%20Html%20head%20section%20for%20WordPress%27s%20Recent%20Comments%20widget%3F%20Wonder%20where%20it%20came%20from%3F%20Do%20you%20want%20to%20know%20how%20to%20get%20rid%20of%20it%3F%20Learn%20how%20to%20write%20a%20WordPress%20filter%20to%20remove%20a%20filter.&amp;short_link=http://b2l.me/ap3v4x&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+remove+inline+Recent+Comments+style+from+WordPress&amp;link=http://webstractions.com/wordpress/remove-recent-comments-inline-styl/&amp;notes=Have%20you%20found%20an%20inline%20style%20in%20your%20Html%20head%20section%20for%20WordPress%27s%20Recent%20Comments%20widget%3F%20Wonder%20where%20it%20came%20from%3F%20Do%20you%20want%20to%20know%20how%20to%20get%20rid%20of%20it%3F%20Learn%20how%20to%20write%20a%20WordPress%20filter%20to%20remove%20a%20filter.&amp;short_link=http://b2l.me/ap3v4x&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+remove+inline+Recent+Comments+style+from+WordPress&amp;link=http://webstractions.com/wordpress/remove-recent-comments-inline-styl/&amp;notes=Have%20you%20found%20an%20inline%20style%20in%20your%20Html%20head%20section%20for%20WordPress%27s%20Recent%20Comments%20widget%3F%20Wonder%20where%20it%20came%20from%3F%20Do%20you%20want%20to%20know%20how%20to%20get%20rid%20of%20it%3F%20Learn%20how%20to%20write%20a%20WordPress%20filter%20to%20remove%20a%20filter.&amp;short_link=http://b2l.me/ap3v4x&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+remove+inline+Recent+Comments+style+from+WordPress&amp;link=http://webstractions.com/wordpress/remove-recent-comments-inline-styl/&amp;notes=Have%20you%20found%20an%20inline%20style%20in%20your%20Html%20head%20section%20for%20WordPress%27s%20Recent%20Comments%20widget%3F%20Wonder%20where%20it%20came%20from%3F%20Do%20you%20want%20to%20know%20how%20to%20get%20rid%20of%20it%3F%20Learn%20how%20to%20write%20a%20WordPress%20filter%20to%20remove%20a%20filter.&amp;short_link=http://b2l.me/ap3v4x&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+remove+inline+Recent+Comments+style+from+WordPress&amp;link=http://webstractions.com/wordpress/remove-recent-comments-inline-styl/&amp;notes=Have%20you%20found%20an%20inline%20style%20in%20your%20Html%20head%20section%20for%20WordPress%27s%20Recent%20Comments%20widget%3F%20Wonder%20where%20it%20came%20from%3F%20Do%20you%20want%20to%20know%20how%20to%20get%20rid%20of%20it%3F%20Learn%20how%20to%20write%20a%20WordPress%20filter%20to%20remove%20a%20filter.&amp;short_link=http://b2l.me/ap3v4x&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+remove+inline+Recent+Comments+style+from+WordPress&amp;link=http://webstractions.com/wordpress/remove-recent-comments-inline-styl/&amp;notes=Have%20you%20found%20an%20inline%20style%20in%20your%20Html%20head%20section%20for%20WordPress%27s%20Recent%20Comments%20widget%3F%20Wonder%20where%20it%20came%20from%3F%20Do%20you%20want%20to%20know%20how%20to%20get%20rid%20of%20it%3F%20Learn%20how%20to%20write%20a%20WordPress%20filter%20to%20remove%20a%20filter.&amp;short_link=http://b2l.me/ap3v4x&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-printfriendly">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+remove+inline+Recent+Comments+style+from+WordPress&amp;link=http://webstractions.com/wordpress/remove-recent-comments-inline-styl/&amp;notes=Have%20you%20found%20an%20inline%20style%20in%20your%20Html%20head%20section%20for%20WordPress%27s%20Recent%20Comments%20widget%3F%20Wonder%20where%20it%20came%20from%3F%20Do%20you%20want%20to%20know%20how%20to%20get%20rid%20of%20it%3F%20Learn%20how%20to%20write%20a%20WordPress%20filter%20to%20remove%20a%20filter.&amp;short_link=http://b2l.me/ap3v4x&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=236&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Send this page to Print Friendly">Send this page to Print Friendly</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://webstractions.com/wordpress/remove-recent-comments-inline-styl/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Writing a WordPress Function: breadcrumbs()</title>
		<link>http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/</link>
		<comments>http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 17:00:17 +0000</pubDate>
		<dc:creator>Ronnie T. Dodger</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[breadcrumbs]]></category>
		<category><![CDATA[function name prefix]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[helper functions]]></category>
		<category><![CDATA[html helpers]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[template functions]]></category>
		<category><![CDATA[template tags]]></category>
		<category><![CDATA[wordpress functions]]></category>
		<category><![CDATA[wordpress theme]]></category>

		<guid isPermaLink="false">http://webstractions.com/?p=84</guid>
		<description><![CDATA[Let's write a function for breadcrumbs that can be easily added to your Wordpress themes. Wordpress functions are preferable over the hundreds of plugins that are available -- to me anyway. ]]></description>
			<content:encoded><![CDATA[<p>A WordPress theme can optionally use a functions file, which resides in the theme subdirectory and is named <em>functions.php</em>. This file basically acts just like a WordPress plugin, and if it is present in the theme you are using, it is automatically loaded during WordPress initialization.</p>
<p>Since you can define a function that can be used in several template files of your theme, a useful function to have around would be breadcrumbs. Breadcrumbs are a user-friendly navigation tool to complement your blog with. They are also good for internal linking structure, which is a sound SEO practice. </p>
<h2>Organization First</h2>
<p>We can write new functions and place them inside functions.php without any problems. However, as we will be writing more functions in the future, this file will start to grow. The file will become bloated, unorganized, and harder to manage. </p>
<p>We will use functions.php to <em>include</em> another function file. This external  file will contain our breadcrumbs function, and other functions that are related to it. One related function for breadcrumbs will be a <em>helper</em> function that will generate the Html for anchor links (more on this later).</p>
<p>Also, instead of cluttering the main theme directory with all of our new function files, we will create a subdirectory to store them all in. This will have the added benefit of moving the entire directory into other theme designs without having to dig around looking for them in the main theme directory.</p>
<h2>Structuring Directories and Files</h2>
<p>Create a subdirectory inside of your main theme directory named <kbd>/functions/</kbd>. </p>
<p>Inside the new subdirectory, create a blank file named <kbd>template-functions.php</kbd>. We could have named this new file breadcrumbs.php, but I am planning on adding more template functions in the future. </p>
<p>Insert the following code into the newly created template-functions.php file and save it:</p>
<pre name="code" class="php">

&lt;?php

/***********************************************************
* wsf_breadcrumbs() - Shows breadcrumbs in template
***********************************************************/
function wsf_breadcrumbs() {
}

/***********************************************************
* Helper Functions for template coding
***********************************************************/
function wsf_make_link () {
}

 ?&gt;
</pre>
<p>Right now, the functions in this file do not do anything. Don&#8217;t worry, we will be fleshing that all out below.</p>
<p>Also note that I prefixed my function names with <kbd>wsf_</kbd>. All of my functions will be prefixed this way. The reason is to avoid any conflict with pre-existing functions or plugins.  </p>
<p>Hopefully this prefix is an unique one, and makes sense where it is coming from — in this case, wsf_ stands for <strong>W</strong>eb<strong>S</strong>tractions <strong>F</strong>unction. Feel free to use your own prefix in place of this one.</p>
<p>Open up the functions.php file inside your theme directory.  Most themes should have this file. If yours does not, create it. </p>
<p class="note">From this point on, I am assuming that you have a basic grasp of coding Wordperfect templates and some knowledge of how Php works. Remember that Php statements must reside between the <kbd>&lt;?php</kbd> and <kbd>?&gt;</kbd></p>
<p>Near the top of the functions.php file, and after the opening <kbd>&lt;?php</kbd> tag, add the following line of code:</p>
<pre name="code" class="php">

   require_once('functions/template-functions.php');
</pre>
<p>The canvas is now set, let&#8217;s get on with a little coding.<br />
<br clear="all" /></p>
<h2>Template Helper Functions</h2>
<p>Breadcrumbs contain at least one link, or they can contain many links. Each step in building the breadcrumbs involves repetitive Html coding for anchor links.</p>
<p>Lets create a helper function to dynamically create the Html for the anchor link and add in some optional goodies along with it. </p>
<p>Edit your <kbd>functions/template-functions.php</kbd> file for the wsf_make_link function:</p>
<pre name="code" class="php">

/***********************************************************
* Helper Functions for template coding
***********************************************************/
function wsf_make_link ( $url, $anchortext, $title=null, $nofollow=false ) {
   if ( $title == null ) $title=$anchortext;
   $nofollow==true ? $rel=' rel="nofollow"' : $rel = ''; 

   $link = sprintf( '<a href="%s" title="%s"%s>%s</a>', $url, $title, $rel, $anchortext );
   return $link;
}
</pre>
<p>This helper function takes two required parameters and two optional parameters. They are pretty much self-explanatory and you will notice that extra goody for setting the relationship of the link to Nofollow. </p>
<p>The helper function formats the parameters into a string variable and returns that variable for you to process further. Let&#8217;s put this function to work in our breadcrumbs function now.</p>
<h2>The breadcrumbs() Template Function</h2>
<p>Edit your <kbd>functions/template-functions.php</kbd> file for the wsf_breadcrumbs function:</p>
<pre name="code" class="php">

/***********************************************************
* wsf_breadcrumbs() - Shows breadcrumbs in template
***********************************************************/
function wsf_breadcrumbs( $sep = '/', $label = 'Browsing' ) {

	global $post;

   // Do not show breadcrumbs on home or front pages.
   // So we will just return quickly
   if((is_home() || is_front_page()) &#038;&#038; (!$front_page))
      return;

	// Create a constant for the separator, with space padding.
	$SEP = '&nbsp;' . $sep . '&nbsp;';

  echo '
<div class="breadcrumbs">';
	echo $label . ': ';
  echo wsf_make_link( get_bloginfo('url'), 'Home', get_bloginfo('name'), true ) . $SEP;

  if(is_single()) {
  	the_category(', '); echo $SEP;
	}
	elseif(is_page()) {
			$parent_id = $post->post_parent;
			$parents = array();
			while($parent_id) {
				$page = get_page($parent_id);
  			$parents[]  = wsf_make_link( get_permalink($page->ID), get_the_title($page->ID) ) . $SEP;
				$parent_id  = $page->post_parent;
			}
			$parents = array_reverse($parents);
			foreach($parents as $parent) {
				echo $parent;
			}
   }
   // Wordpess function that echoes your post title.
   the_title();
	 echo '</div>

';
}
</pre>
<p>The breadcrumbs function takes two optional parameters for the crumb separator and the label which gets pre-pended. Hopefully this is all pretty much explanatory.</p>
<p>Currently this function will only work on single post pages and pages that you create by hand. </p>
<p>For single posts, this function will look like the breadcrumb at the top of this page. If I have a post that contains more than one category, then they all will be listed and separated by a comma. (Ugly, I know. Will work on a better method in the future).</p>
<p>For your hand generated pages, there is a loop that will recursively step through the hierarchy of parent categories. You can have a page nested three, four, or more levels deep and this loop will follow it all the way back to the top. </p>
<p>In the future I plan on adding loops for tags, categories, archives, etc. But for now, the two biggies are here.</p>
<h2>Using Your breadcrumbs() Function in a Theme</h2>
<p>This is easy to plug into any theme. Since breadcrumbs will only show up for single posts and custom pages, you will only need to add the function to your <em>single.php</em> and <em>page.php</em> files.</p>
<p>Add this line in your theme file where you want the breadcrumbs to appear:</p>
<pre name="code" class="php">

   &lt;?php wsf_breadcrumbs('&raquo;','You are here') ?&gt;
</pre>
<p>That will generate a breadcrumb like this:</p>
<div class="breadcrumbs" style="font-size:.9em;background-color:#eee;">You are here: <a href="http://webstractions.com" title="Webstractions Web Development">Home</a>&nbsp;&raquo;&nbsp;<a href="http://webstractions.com/category/wordpress/" title="View all posts in WordPress" rel="category tag">WordPress</a>&nbsp;&raquo;&nbsp;Writing a WordPress Function: breadcrumbs()</div>
<p>&nbsp;</p>
<p>Kewl, eh? </p>
<p>That is about all there is to it. You just wrote some functions that you can re-use in all of your WordPress themes. Congratulations!</p>
<p>If you have any problems with this, let me know with a comment below. </p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://www.shareaholic.com/api/share/?title=Writing+a+Wordpress+Function%3A+breadcrumbs%28%29&amp;link=http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/&amp;notes=Let%27s%20write%20a%20function%20for%20breadcrumbs%20that%20can%20be%20easily%20added%20to%20your%20Wordpress%20themes.%20Wordpress%20functions%20are%20preferable%20over%20the%20hundreds%20of%20plugins%20that%20are%20available%20--%20to%20me%20anyway.%20&amp;short_link=http://b2l.me/ap3wne&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=2&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://www.shareaholic.com/api/share/?title=Writing+a+Wordpress+Function%3A+breadcrumbs%28%29&amp;link=http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/&amp;notes=Let%27s%20write%20a%20function%20for%20breadcrumbs%20that%20can%20be%20easily%20added%20to%20your%20Wordpress%20themes.%20Wordpress%20functions%20are%20preferable%20over%20the%20hundreds%20of%20plugins%20that%20are%20available%20--%20to%20me%20anyway.%20&amp;short_link=http://b2l.me/ap3wne&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=3&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Writing+a+Wordpress+Function%3A+breadcrumbs%28%29&amp;link=http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/&amp;notes=Let%27s%20write%20a%20function%20for%20breadcrumbs%20that%20can%20be%20easily%20added%20to%20your%20Wordpress%20themes.%20Wordpress%20functions%20are%20preferable%20over%20the%20hundreds%20of%20plugins%20that%20are%20available%20--%20to%20me%20anyway.%20&amp;short_link=http://b2l.me/ap3wne&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Writing+a+Wordpress+Function%3A+breadcrumbs%28%29&amp;link=http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/&amp;notes=Let%27s%20write%20a%20function%20for%20breadcrumbs%20that%20can%20be%20easily%20added%20to%20your%20Wordpress%20themes.%20Wordpress%20functions%20are%20preferable%20over%20the%20hundreds%20of%20plugins%20that%20are%20available%20--%20to%20me%20anyway.%20&amp;short_link=http://b2l.me/ap3wne&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.shareaholic.com/api/share/?title=Writing+a+Wordpress+Function%3A+breadcrumbs%28%29&amp;link=http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/&amp;notes=Let%27s%20write%20a%20function%20for%20breadcrumbs%20that%20can%20be%20easily%20added%20to%20your%20Wordpress%20themes.%20Wordpress%20functions%20are%20preferable%20over%20the%20hundreds%20of%20plugins%20that%20are%20available%20--%20to%20me%20anyway.%20&amp;short_link=http://b2l.me/ap3wne&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=257&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.shareaholic.com/api/share/?title=Writing+a+Wordpress+Function%3A+breadcrumbs%28%29&amp;link=http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/&amp;notes=Let%27s%20write%20a%20function%20for%20breadcrumbs%20that%20can%20be%20easily%20added%20to%20your%20Wordpress%20themes.%20Wordpress%20functions%20are%20preferable%20over%20the%20hundreds%20of%20plugins%20that%20are%20available%20--%20to%20me%20anyway.%20&amp;short_link=http://b2l.me/ap3wne&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=38&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Writing+a+Wordpress+Function%3A+breadcrumbs%28%29&amp;link=http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/&amp;notes=Let%27s%20write%20a%20function%20for%20breadcrumbs%20that%20can%20be%20easily%20added%20to%20your%20Wordpress%20themes.%20Wordpress%20functions%20are%20preferable%20over%20the%20hundreds%20of%20plugins%20that%20are%20available%20--%20to%20me%20anyway.%20&amp;short_link=http://b2l.me/ap3wne&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%24%7Btitle%7D+-+%24%7Bshort_link%7D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-printfriendly">
			<a href="http://www.shareaholic.com/api/share/?title=Writing+a+Wordpress+Function%3A+breadcrumbs%28%29&amp;link=http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/&amp;notes=Let%27s%20write%20a%20function%20for%20breadcrumbs%20that%20can%20be%20easily%20added%20to%20your%20Wordpress%20themes.%20Wordpress%20functions%20are%20preferable%20over%20the%20hundreds%20of%20plugins%20that%20are%20available%20--%20to%20me%20anyway.%20&amp;short_link=http://b2l.me/ap3wne&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=236&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Send this page to Print Friendly">Send this page to Print Friendly</a>
		</li>
</ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div><div style="clear: both;"></div></div>

]]></content:encoded>
			<wfw:commentRss>http://webstractions.com/wordpress/writing-a-wordpress-function-breadcrumbs/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

