Skip to content

Instantly share code, notes, and snippets.

View jongamble's full-sized avatar

Jon Gamble jongamble

View GitHub Profile
<?php // Let's make a trail of crumbs, whether we are on the post or the page....This DOES NOT support custom Post Types...
function get_breadcrumbs($post){
//Create an is_blog function
function is_blog($post) {
$posttype = get_post_type($post);
return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ;
}
$bread_crumb_trail = '<span><a href="'.get_bloginfo('url').'">Home</a></span> &raquo;';
//Ancestors will only live on hierarchical posts...just pages.