nerd4hire
4/30/2014 - 3:16 PM

Test Category breadcrumb 2 From http://wpquestions.com/question/showChrono/id/8727

<php?

function the_breadcrumb() {

	echo '<span id="crumbs">';

	if (!is_home()) {

		echo '<span><a href="';

		echo get_option('home');

		echo '">';

		echo 'Homepage';

		echo "</a><span> -> </span>";

		if (is_category()) {

			echo '<span>';

			the_category('<span>/</span></span><span>');

			echo '</span>'; //I think you should add this

		}else if(is_single()){

			$cat = get_the_category();

			echo '';

			if($cat[0]){

                echo get_category_parents($cat[0], true,'<span> -> </span>');
			}
			echo '<span>'. get_the_title().'</span>';

		} elseif (is_page()) {
			echo '<span>';
			echo the_title();
			echo '</span>';
		}
	}

	elseif (is_tag()) {single_tag_title();}

	elseif (is_day()) {echo"<span>Archive for "; the_time('F jS, Y'); echo'</span>';}

	elseif (is_month()) {echo"<span>Archive for "; the_time('F, Y'); echo'</span>';}

	elseif (is_year()) {echo"<span>Archive for "; the_time('Y'); echo'</span>';}

	elseif (is_author()) {echo"<span>Author Archive"; echo'</span>';}

	elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo "<span>Blog Archives"; echo'</span>';}

	elseif (is_search()) {echo"<span>Search Results"; echo'</span>';}

	echo '<div class="clear"></div></span>';

}
?>