Skip to content

Instantly share code, notes, and snippets.

View blickwert's full-sized avatar

David Wögerer blickwert

View GitHub Profile
@benhuson
benhuson / get_the_term_list_breadcrumbs.php
Created February 17, 2012 14:55
get_the_term_list_breadcrumbs() - Same as get_the_term_list() but outputs a terms parents as part of the link.
/**
* Get the Term List Breadcrumbs
* Same as get_the_term_list() but outputs a terms parents as part of the link.
* Useful when you have many subcategories all with the same name.
*/
function get_the_term_list_breadcrumbs( $id = 0, $taxonomy, $before = '', $sep = '', $after = '', $breadcrumb_sep = ' → ' ) {
$terms = get_the_terms( $id, $taxonomy );
if ( is_wp_error( $terms ) )