public function category() {
		global $cat;

		$category = get_category( $cat );
		if ( $category->parent != 0 ) {
			$ancestors = array_reverse( get_ancestors( $category->term_id, 'category') );
			foreach ( $ancestors as $ancestor_id ) {
				$ancestor = get_category( $ancestor_id );
				$this->addCrumb( $ancestor->name, get_category_link( $ancestor->term_id ) );
			}
		}
		$this->addCrumb( $this->label('category', $category->name ), get_category_link( $cat ) );
	}
public function category() {
		global $cat;

		$category = get_category( $cat );
		if ( $category->parent != 0 ) {
			$ancestors = array_reverse( get_ancestors( $category->term_id, 'category') );
			foreach ( $ancestors as $ancestor_id ) {
				$ancestor = get_category( $ancestor_id );
				$this->addCrumb( $ancestor->name, get_category_link( $ancestor->term_id ) );
			}
		}
		$this->addCrumb( $this->label('category', $category->name ), get_category_link( $cat ) );
	}
public function category ( ) { global $ cat ; $ category = get_category ( $ cat ) ; if ( $ category -> parent != 0 ) { $ ancestors = array_reverse ( get_ancestors ( $ category -> term_id , 'category' ) ) ; foreach ( $ ancestors as $ ancestor_id ) { $ ancestor = get_category ( $ ancestor_id ) ; $ this -> addCrumb ( $ ancestor -> name , get_category_link ( $ ancestor -> term_id ) ) ; } } $ this -> addCrumb ( $ this -> label ( 'category' , $ category -> name ) , get_category_link ( $ cat ) ) ; }
Add Category Crumb
Add Category Crumb