Skip to content

Instantly share code, notes, and snippets.

Created December 25, 2012 02:01
Show Gist options
  • Save anonymous/4371348 to your computer and use it in GitHub Desktop.
Save anonymous/4371348 to your computer and use it in GitHub Desktop.
A function for adding breadcrumbs to a theme based on zurb's foundation framework. Based on: http://www.catswhocode.com/blog/how-to-breadcrumb-function-for-wordpress
function the_breadcrumb() {
if (!is_home()) {
echo '<ul class="breadcrumbs"><li><a href="';
echo get_option('home');
echo '">';
bloginfo('name');
echo "</a></li>";
if (is_category() || is_single()) {
the_category('<li>');
if (is_single()) {
echo " ";
the_title();
}
} elseif (is_page()) {
echo the_title('<li>');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment