WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Multiple taxonomies, which one used for breadcrumbs? (7 posts)

  1. sccr410
    Member
    Posted 2 years ago #

    So we have a site that has a custom post type with hierarchical custom taxonomies (a store). We use the breadcrumbs on the single page output of our custom post type. When we assign multiple top-level taxonomies (think shirts/pants/etc) the breadcrumbs part chooses just one taxonomy to use in the path - that is fine. However, I want to understand how the taxonomy used is chosen. I would assume it would either by alphabetically or whichever taxonomy was entered first (lower ID). However, it appears neither of these are true.

    This is important for us because we have code in our header that displays a special menu based on which category you are in or which category the current product you are viewing is in. Our code for determining which menu to display is not lining up with how the breadcrumbs plugin is showing and we have mismatching menu and breadcrumb paths.

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm there's no real logic to it other than "what WordPress returns as first".

  3. sccr410
    Member
    Posted 2 years ago #

    I have been digging for so long and I cannot figure out the order that is being used to determine the default custom taxonomy for the breadcrumb. In the WP SEO code, where is it that you are grabbing the current posts taxonomies so then I can see what WP function you are using and then maybe use that to determine which order is being used by default. Nothing I do seems to work and it appears to be random for each post.

  4. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    It could very well be random indeed. WordPress doesn't have the concept of a "main" category / taxonomy, so it doesn't know how to return that.

  5. sccr410
    Member
    Posted 2 years ago #

    Got this figured out, thanks

  6. Daniel
    Member
    Posted 1 year ago #

    I'm looking into this as well now sccr410 - Was what you figuyred out in addition to what's said here? Would be great to know, thanks!

  7. janubande007
    Member
    Posted 1 year ago #

    There's a BUG with Breadcrumbs, I've filed a detailed report here: http://wordpress.org/support/topic/bug-nested-categories-with-breadcrumbs-navigation

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic