Confusing breadcrumbs for multiple queries
-
Let’s say we have a site example.com with with such product attributes as “flavour” and “size”. Then, if we want to get products which have banana flavour and big size at the same time we use such a link:
example.com/?pa_flavour=banana&pa_size=big
Breadcrumbs would be:
Home / Product Flavour banana
No word about big size.
Looks like you’re always getting alphabetically first attribute.
When you use product attribute + tag query you’re always getting breadcrumbs for tag archive page without mention of attribute used for query.
Also breadcrumbs for tag archive for some reason has “shop” in the path while attribute archive page does not.
E.g. for
example.com/?pa_flavour=strawberry&tag=glowing
we will get such breadcrumbs:
Home > Shop > Products tagged "glowing"
All these leads to confusing user experience and poor navigation.
I studied a code a little bit and my assumption is that it’s related to usingget_queried_object()
in class-wc-breadcrumb.php which retrieves only one taxonomy for query.
The issue is described here – https://core.trac.www.ads-software.com/ticket/5358 and here – https://core.trac.www.ads-software.com/ticket/31680
The solution in my opinion is to retrieve all taxonomy from query and let user set hierarchy in which it’s shown in breadcrumbs.
- The topic ‘Confusing breadcrumbs for multiple queries’ is closed to new replies.