WordPress.org

Ready to get started?Download WordPress

Forums

Breadcrumb NavXT
[resolved] Hierachy in breadcrumb (8 posts)

  1. greencode
    Member
    Posted 2 years ago #

    I have a post that's in the following categories (I'm not doing a site about fruit by the way, just thought it would be easier doing it this way):

    Fruits (ID 11)
    - Citrus Fruits (ID 12)
    Featured (ID 103)

    But it's coming out like this on the breadcrumb trail

    Home > Featured > Orange

    Whereas I need it like this:

    Home > Fruit > Citrus fruits > Orange

    I'm presuming this has to do with the hierachy of the categories? Is there any way around this?

    http://wordpress.org/extend/plugins/breadcrumb-navxt/

  2. John Havlik
    Member
    Plugin Author

    Posted 2 years ago #

    For the post "Orange" is it just a member of "Citrus Fruits" and "Featured"? Also, "Citrus Fruits" is a child category of "Fruits", correct? If so Breadcrumb NavXT should pick the first category hierarchy it finds, which would be the desired behavior in this case. What you may want to do is use a tag for "Featured", which seems more appropriate for it.

  3. greencode
    Member
    Posted 2 years ago #

    Thanks for your reply.

    Actually what I have is this:

    Fruits (ID 11)
    - Citrus Fruits (ID 12)
    Featured (ID 103)
    - Featured Sub (ID 104)

    So what it's doing is finding the first hierarchy which is Featured Sub and then using that in the breadcrumb trail.

    Is there no way to specify the hierarchy either using the plugin or another plugin?

  4. John Havlik
    Member
    Plugin Author

    Posted 2 years ago #

    You would need to make get_the_terms return the desired category hierarchy first (in this case Citrus Fruits). There may be a way to hook into it, but that's an exercise left to the reader. Adding an setting for this would require you to set it on every post (term_meta does not exist). This is wasteful when other, more elegant solutions exist.

    Instead of using just Categories you should consider using a mixture of taxonomies to achieve what you are trying to do. Reserving one as the master hierarchy for the posts and the others as auxiliary descriptors/locaters.

  5. greencode
    Member
    Posted 2 years ago #

    When you say using a mixture of taxonomies do you mean categories and tags?

  6. John Havlik
    Member
    Plugin Author

    Posted 2 years ago #

    Categories, tags, and custom taxonomies (can be hierarchical or flat). For some of what you are trying to do you may find custom taxonomies helpful, see http://codex.wordpress.org/Taxonomies

  7. greencode
    Member
    Posted 2 years ago #

    Thanks. I've decided to go with using Tags as well as Categories

  8. scorilo
    Member
    Posted 1 year ago #

    Hello,
    I use woocommerce and when I made ​​the update to woocommerce2 breadcrumbs trail not displayed correctly.
    is displayed correctly only to arrive in a products subcategory.
    when choosing items to display(product in shop) breadcrumbs trail show me a wrong subcategory and a wrong product.
    Ex: i am in "Magazin > Products > Polen"
    [Magazin(main cat.), Products(subcat.), Polen(subcat.)]- the trail is corect;
    When I choose a product from Polen category, the breadcrumbs trail is wrong, it shows me another breadcrumb trail from another category and another product.
    I use graphene theme and wp 3.5.1
    Can you help me?
    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.