Breadcrumbs problem when product in multiple categories

This topic has 3 replies, 2 voices, and was last updated 4 years, 8 months ago ago by Rose Tyler

  • Avatar: heltaskelta
    heltaskelta
    Participant
    February 21, 2020 at 22:26

    Hi,

    We have products which are listed in multiple categories. With regards to the breadcrumbs, all is fine except for when you navigate to the single product page. Here the breadcrumb always seems to show the most recently created category regardless of what other categories the product is in or how you navigated there. This could be very confusing for the customer when they have navigated to the product via a different category channel than the breadcrumb displays.

    Firstly, is there a way to have the breadcrumbs for products that are listed in multiple categories show the category structure of how a user navigated their way to the single product page?

    I am thinking the above is not possible. However, we have YOAST SEO installed and they indicate they have a solution which gives us some level of control where we can choose a ‘Primary’ category for a product which is listed in multiple categories. This will be satisfactory as it will at least let us choose rather than WP choosing for us by default. To get this to work, YOAST require some code to be added and suggest we ask the theme developers exactly where it needs to be added.

    You can see their guide here: https://yoast.com/help/implement-wordpress-seo-breadcrumbs/

    Could please advise which file in you theme and also where exactly do we put this code?

    Thank you.

    Please, contact administrator
    for this information.
    2 Answers
    Avatar: heltaskelta
    heltaskelta
    Participant
    February 21, 2020 at 23:55

    Also, an alternative solution would be if we could disable breadcrumbs on the single product pages ONLY. Keep them everywhere else and also keep the ‘Return to previous page’ link. So if you could also let us know some CSS code to just hide/disable the breadcrumbs on the single product pages only that would be great.

    Thank you.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    February 22, 2020 at 10:32

    Hello,

    You can add the next code in Theme options > Theme Custom CSS > Global custom CSS:

    .single-product .woocommerce-breadcrumb {
        display: none;
    }

    Regards

  • Viewing 3 results - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.