<?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>Modern Tribe Inc. &#187; navigation</title>
	<atom:link href="http://tri.be/tag/navigation/feed/" rel="self" type="application/rss+xml" />
	<link>http://tri.be</link>
	<description>WordPress event plugins for people who kick ass</description>
	<lastBuildDate>Wed, 22 May 2013 05:10:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
<image><url>http://tri.be/wp-content/themes/moderntribe/images/branding/logo.png</url></image>		<item>
		<title>Revisited: Showing Events and Venues in Breadcrumbs</title>
		<link>http://tri.be/using-conditionals-to-show-breadcrumbs-for-events-and-venues/</link>
		<comments>http://tri.be/using-conditionals-to-show-breadcrumbs-for-events-and-venues/#comments</comments>
		<pubDate>Mon, 02 Jul 2012 19:05:59 +0000</pubDate>
		<dc:creator>Jonah West</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[breadcrumbs]]></category>
		<category><![CDATA[custom taxonomies]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[venues]]></category>

		<guid isPermaLink="false">http://tri.be/?p=11198</guid>
		<description><![CDATA[The Events Calendar comes with a few built-in conditionals that can be very useful when customizing your templates. The Question Recently, a user asked why events were not showing up correctly in his breadcrumbs. The Answer Unless your breadcrumb code is checking for custom taxonomies, it&#8217;s not going to know what to do with events and venues. Most breadcrumb plugins use a mix of conditionals to determine what to show, and often custom taxonomies don&#8217;t &#8230; <a href="http://tri.be/using-conditionals-to-show-breadcrumbs-for-events-and-venues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://tri.be/using-conditionals-to-show-breadcrumbs-for-events-and-venues/conditional-tutorial/" rel="attachment wp-att-11200"></a>The Events Calendar comes with a few built-in conditionals that can be very useful when customizing your templates.</p>
<p><strong>The Question</strong></p>
<p>Recently, a user <a href="http://tri.be/support/forums/topic/slug-not-showing-in-breadcrumbs/">asked</a> why events were not showing up correctly in his breadcrumbs.</p>
<p><strong>The Answer</strong></p>
<p>Unless your breadcrumb code is checking for custom taxonomies, it&#8217;s not going to know what to do with events and venues. Most breadcrumb plugins use a mix of conditionals to determine what to show, and often custom taxonomies don&#8217;t make it into the mix. So, let&#8217;s fix that!</p>
<p><strong>The Code</strong></p>
<p>Here&#8217;s a code snippet you can drop in your <strong>functions.php</strong> file that uses the built-in conditionals to handle events and venues.</p>
<ul>
<li>You can use it verbatim just add <strong>tribe_breadcrumbs();</strong> to your page template.</li>
<li>Or if you use a theme framework, just add an action hook wherever you want the breadcrumbs to appear: <strong>add_action(&#8216;hook_name&#8217;,'tribe_breadcrumbs&#8217;);</strong></li>
</ul>
<pre class="brush: php; title: ; notranslate">
// Check if page is direct child
function is_child($page_id) {
    global $post;
    if( is_page() &amp;&amp; ($post-&gt;post_parent != '') ) {
       return true;
    } else {
       return false;
    }
}

function tribe_breadcrumbs() {

	global $post;

	$seperator = &quot; &amp;raquo; &quot;;
	echo '&lt;a href=&quot;';
	echo get_option('home');
	echo '&quot;&gt;';
	bloginfo('name');
	echo &quot;&lt;/a&gt;&quot;;

    if( tribe_is_month() &amp;&amp; !is_tax() ) { // The Main Calendar Page

    	echo $seperator;
    	echo 'The Events Calendar';

    } elseif( tribe_is_month() &amp;&amp; is_tax() ) { // Calendar Category Pages

			global $wp_query;
			$term_slug = $wp_query-&gt;query_vars['tribe_events_cat'];
			$term = get_term_by('slug', $term_slug, 'tribe_events_cat');
			get_term( $term_id, 'tribe_events_cat' );
			$name = $term-&gt;name;
			echo $seperator;
      echo '&lt;a href=&quot;'.tribe_get_events_link().'&quot;&gt;Events&lt;/a&gt;';
      echo $seperator;
      echo $name;

		} elseif( tribe_is_event() &amp;&amp; !tribe_is_day() &amp;&amp; !is_single() ) { // The Main Events List

			echo $seperator;
      echo 'Events List';

		} elseif( tribe_is_event() &amp;&amp; is_single() ) { // Single Events

			echo $seperator;
			echo '&lt;a href=&quot;'.tribe_get_events_link().'&quot;&gt;Events&lt;/a&gt;';
			echo $seperator;
      the_title();

		} elseif( tribe_is_day() ) { // Single Event Days

			global $wp_query;
			echo $seperator;
			echo '&lt;a href=&quot;'.tribe_get_events_link().'&quot;&gt;Events&lt;/a&gt;';
			echo $seperator;
			echo 'Events on: ' . date('F j, Y', strtotime($wp_query-&gt;query_vars['eventDate']));

		} elseif( tribe_is_venue() ) { // Single Venues

			echo $seperator;
      echo '&lt;a href=&quot;'.tribe_get_events_link().'&quot;&gt;Events&lt;/a&gt;';
      echo $seperator;
      the_title();

		} elseif (is_category() || is_single()) {

			echo $seperator;
			the_category(' &amp;bull; ');
			if (is_single()) {
				echo ' '.$seperator.' ';
				the_title();
			}

    } elseif (is_page()) {

    	if(is_child(get_the_ID())) {
    		echo $seperator;
    		echo '&lt;a href=&quot;' . get_permalink($post-&gt;post_parent) . '&quot;&gt;' . get_the_title($post-&gt;post_parent) . '&lt;/a&gt;';
    		echo $seperator;
      	echo the_title();
    	} else {
    		echo $seperator;
      	echo the_title();
    	}

		} elseif (is_search()) {

      echo $seperator.'Search Results for... ';
			echo '&quot;&lt;em&gt;';
			echo the_search_query();
			echo '&lt;/em&gt;&quot;';

    }

}
</pre>
<p>This code is based on the <a href="http://diythemes.com/thesis/rtfm/breadcrumbs-without-plugins/" target="_blank">Thesis Breadcrumbs Without Plugins</a> code.</p>
]]></content:encoded>
			<wfw:commentRss>http://tri.be/using-conditionals-to-show-breadcrumbs-for-events-and-venues/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>