Breadcrumbs issue - by jeremy - on WordPress WooCommerce support

This topic has 8 replies, 2 voices, and was last updated 7 years, 8 months ago ago by Robert Hall

  • Avatar: tlgv
    jeremy
    Participant
    August 5, 2016 at 18:44

    Hi,

    I have a problem when I assign a product to multiple categories. I select the main category in my product backoffice but the category displayed in breadcrumb on product page is not the main category but the first category I assign on my category list in my backoffice.

    For instance, I have these categories on my product backoffice:
    – Chair
    – Armchair
    – Sofa
    – Lamp

    I check Armchair and sofa and I assign sofa as main category. So the breadcrumb should be:
    Home > Sofa > Product

    But the breadcrumb displayed is Home > Armchair > Product

    How can I fix that?

    Thanks a lot.

    7 Answers
    Avatar: Robert Hall
    Robert Hall
    Support staff
    August 6, 2016 at 09:00

    Hello,

    Currently the category displayed is that one whose name comes first in alphabet.
    In this case you can try to find some 3rd-party plugins to change order.

    Regards,
    Robert Hall

    Avatar: tlgv
    jeremy
    Participant
    August 6, 2016 at 10:13

    Hi,

    Ok but I don’t want to use a plugin to do this, how and where can I remove/change some code from your theme to remove this alphabet function?

    Thank you.

    Avatar: Robert Hall
    Robert Hall
    Support staff
    August 8, 2016 at 10:43

    Hello,

    This requires additional customization which is not for free.
    If you agree to proceed please contact us via form https://www.8theme.com/customization-services/ for further information.

    Regards,
    Robert Hall

    Avatar: tlgv
    jeremy
    Participant
    August 10, 2016 at 19:20

    Hi Robert,

    Could you just tell me where I can find the query that is doing this?

    Thank you.

    Avatar: Robert Hall
    Robert Hall
    Support staff
    August 11, 2016 at 08:25

    Hello,

    You can find this function in the \wp-content\plugins\woocommerce\includes\wc-template-functions.php file on line 1420-1447

    Regards,
    Robert Hall

    Avatar: tlgv
    jeremy
    Participant
    August 11, 2016 at 20:04

    Hello Robert,

    Thank you, I have one question: do you have a function/query in the royal theme that overwrite original breadcrumb function from woocommerce?

    Thank you.

    Avatar: Robert Hall
    Robert Hall
    Support staff
    August 12, 2016 at 07:42

    Hello,

    You can use the Child Theme to overwrite functions. Also the breadcrumbs function is pluggable.
    Read more about Pluggable functions in this article:
    https://docs.woocommerce.com/document/set-up-and-use-a-child-theme/

    Regards,
    Robert Hall

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

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

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