public function tax() {
		$tax  = get_query_var('taxonomy');
		$term = get_term_by('slug', get_query_var('term'), $tax );
		if ( is_taxonomy_hierarchical( $tax ) && $term->parent != 0 ) {
			$ancestors = array_reverse( get_ancestors( $term->term_id, $tax ) );
			foreach ( $ancestors as $ancestor_id ) {
				$ancestor = get_term( $ancestor_id, $tax );
				$this->addCrumb( $ancestor->name, get_term_link( $ancestor, $tax ) );
			}
		}
		$this->addCrumb(
			$this->label('taxonomy', $term->name ),
			get_term_link( $term->term_id, $tax )
		);
	}
public function tax() {
		$tax  = get_query_var('taxonomy');
		$term = get_term_by('slug', get_query_var('term'), $tax );
		if ( is_taxonomy_hierarchical( $tax ) && $term->parent != 0 ) {
			$ancestors = array_reverse( get_ancestors( $term->term_id, $tax ) );
			foreach ( $ancestors as $ancestor_id ) {
				$ancestor = get_term( $ancestor_id, $tax );
				$this->addCrumb( $ancestor->name, get_term_link( $ancestor, $tax ) );
			}
		}
		$this->addCrumb(
			$this->label('taxonomy', $term->name ),
			get_term_link( $term->term_id, $tax )
		);
	}
public function tax ( ) { $ tax = get_query_var ( 'taxonomy' ) ; $ term = get_term_by ( 'slug' , get_query_var ( 'term' ) , $ tax ) ; if ( is_taxonomy_hierarchical ( $ tax ) && $ term -> parent != 0 ) { $ ancestors = array_reverse ( get_ancestors ( $ term -> term_id , $ tax ) ) ; foreach ( $ ancestors as $ ancestor_id ) { $ ancestor = get_term ( $ ancestor_id , $ tax ) ; $ this -> addCrumb ( $ ancestor -> name , get_term_link ( $ ancestor , $ tax ) ) ; } } $ this -> addCrumb ( $ this -> label ( 'taxonomy' , $ term -> name ) , get_term_link ( $ term -> term_id , $ tax ) ) ; }
Add Tax Crumb
Add Tax Crumb