Home Forums Bee WordPress Theme breadcrumbs links Reply To: breadcrumbs links

#3052

agenciz
Participant

re,

in the breadcrumbs file in section POST, you have this :

$taxonomies = get_post_taxonomies($post->ID);
if (count($taxonomies) > 0) {
foreach($taxonomies as $taxonomy) {
if(is_taxonomy_hierarchical($taxonomy)) {
foreach (wp_get_object_terms($post->ID, $taxonomy) as $term) {
if($term->taxonomy == ‘category’) {
foreach(explode(‘|’, get_category_parents($term->term_id, false, ‘|’, true)) as $ancestor) {
if(trim($ancestor) && $ancestor != $term->slug) {
$ancestor = get_category_by_slug($ancestor);
$this->setBreadcrumb(‘slug, $taxonomy) . ‘” title=”‘ . $ancestor->name . ‘”>’ . $ancestor->name . ‘ ‘);
}
}
}
$this->setBreadcrumb(‘slug, $taxonomy) . ‘” title=”‘ . $term->name . ‘”>’ . $term->name . ‘ ‘);
}
$this->setBreadcrumb($this->_elements[‘separator’]);
}
}
}

So, i don’t want the category displaying but the post or the page ancestor.

i hope that i m understable.

Best