';
if ( is_category() ) {
$cat = get_queried_object();
if ( $cat->parent != 0 ) {
$ancestors = array_reverse( get_ancestors( absint( $cat->cat_ID ), 'category' ) );
if ( is_array( $ancestors ) && 0 < count( $ancestors ) ) { foreach( $ancestors as $ancestor ) {
echo '';
} } unset( $ancestors );
}
echo '';
unset( $cat );
} elseif ( SHAPESHIFTER_IS_PAGE ) {
if ( $post->post_parent != 0 ){
$ancestors = array_reverse( get_post_ancestors( absint( $post->ID ) ) );
if ( is_array( $ancestors ) && 0 < count( $ancestors ) ) { foreach( $ancestors as $ancestor ) {
echo '';
} } $ancestors = null;
}
} elseif ( SHAPESHIFTER_IS_SINGLE ) {
$categories = get_the_category( absint( $post->ID ) );
if( isset( $categories[ 0 ] ) ) {
$cat = $categories[ 0 ];
if ( $cat->parent != 0 ) {
$ancestors = array_reverse( get_ancestors( absint( $cat->cat_ID ), 'category' ) );
if ( is_array( $ancestors ) && 0 < count( $ancestors ) ) { foreach( $ancestors as $ancestor ) {
echo '';
unset( $ancestor );
} }
unset( $ancestors );
}
echo '';
unset( $cat );
}
unset( $categories );
}
echo '';
}