Home Forums Bee WordPress Theme breadcrumbs links

This topic contains 4 replies, has 2 voices, and was last updated by  Johnny 3 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3037

    agenciz
    Participant

    hello,

    the breadecrumbs link to category,
    i want that it links to page or single post,
    is it possible ?
    and how change it ?
    best

    #3047

    Johnny
    Participant

    Hi, please give me more details about this, which link to which page?
    Thank you

    #3050

    agenciz
    Participant

    i want to change the hierarchy of the breadcrumbs.
    Now when i click on the word in the breadcrumb, this is the category page which is display
    i want that will be the parent post or parent page, like in your bredacrumbs on this web site.

    best.

    #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

    #3061

    Johnny
    Participant

    Hi,
    -For the page, if you set parent page, you can display the parent page
    -For the post, because the post can not be set parent page, we can only display its category
    Best

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.