Hey everyone!
I have 2 questions on how to fix my breadcrumbs.
- My breadcrumbs shows the product name and not the collection it’s in (Please see below)
- Also, If you view the product off the landing page it doesn’t show the collections it’s in. But if I go through my tabs “For Her, Selfcare, then the product” it will show the collection (plus the product name)
Please see the difference between the top screenshot and the below one, both the same product, both have different breadcrumbs.
Theme: Dawn
Website: https://meeko-8476.myshopify.com
Password: Meeko
This is the anchor attribute in: card-product.liquid
href=“{{ card_product.url | within: collection }}”
This is the code for breadcrumb.liquid :
.breadcrumbs { margin: 0 0 2em; } .breadcrumbs__list { list-style-type: none; margin: 0; padding: 0; } .breadcrumbs__item { display: inline-block; } .breadcrumbs__item:not(:last-child):after { border-style: solid; border-width: .10em .10em 0 0; content: ''; display: inline-block; height: .20em; margin: 0 .20em; position: relative; transform: rotate(45deg); vertical-align: middle; width: .20em; } .pd_20 { padding-top: 15px; } .breadcrumbs__link { text-decoration: underline; } .breadcrumbs__link[aria-current="page"] { color: inherit; font-weight: normal; text-decoration: none; } .breadcrumbs__link[aria-current="page"]:hover, .breadcrumbs__link[aria-current="page"]:focus { text-decoration: underline; } .breadcrumbs__link_1 { padding-left: 10px; } .breadcrumbs__item.breadcrumbs__link_n a { padding-left: 10px; }{%- unless template == ‘index’ or template == ‘cart’ or template == ‘list-collections’ or template == ‘404’ -%}
{%- assign t = template | split: ‘.’ | first -%}
- Home {%- case t -%} {%- when 'page' -%}
- {{ page.title }} {%- when 'product' -%} {%- if collection.url -%}
- {{ collection.title | link_to: collection.url }} {%- endif -%}
- {{ product.title }} {%- when 'collection' and collection.handle -%} {%- if current_tags -%}
- {{ collection.title | link_to: collection.url }}
- {%- capture tag_url -%}{{ collection.url }}/{{ current_tags | join: "+"}}{%- endcapture -%} {{ current_tags | join: " + "}} {%- else -%}
- {{ collection.title }} {%- endif -%} {%- when 'blog' -%} {%- if current_tags -%}
- {{ blog.title | link_to: blog.url }}
- {%- capture tag_url -%}{{blog.url}}/tagged/{{ current_tags | join: "+" }}{%- endcapture -%} {{ current_tags | join: " + " }} {%- else -%}
- {{ blog.title }} {%- endif -%} {%- when 'article' -%}
- {{ blog.title | link_to: blog.url }}
- {{ article.title }} {%- else -%}
- {{ page_title }} {%- endcase -%}






