This topic has 8 replies, 2 voices, and was last updated 7 years, 8 months ago ago by Robert Hall
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.
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
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.
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
Hi Robert,
Could you just tell me where I can find the query that is doing this?
Thank you.
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
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.
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
You must be logged in to reply to this topic.Log in/Sign up