How can I fix breadcrumb issues in the Dawn theme?

Help!

I’m implementing simple breadcrumbs and the Dawn theme won’t return the path to the Collection. {% if collection %} is being ignored. I traced the requested path. See the preview below and use Best Sellers to find Product 5

{% if template contains "product" %}

{% if collection %}

/
{{ collection.title | escape }}

Here is the Preview link. The path it returns is /products/product-5, when it should be /best-sellers/product-5

https://izgw13130ug4fvgm-59322171565.shopifypreview.com

2 Likes

Hello, did you ever get this working?

1 Like

@ebon

can you try this

https://shopify.github.io/liquid-code-examples/example/breadcrumb-navigation

Thanks for the link. I tried it and it didn’t exactly they way I hoped.

The breadcrumb would only display home/the product title

It wouldn’t display the product category ie. home/headwear/trucker/item

1 Like

@ebon

thanks for update

sorry Shoplift breadcrumb doesn’t allow more customization tis standard code

I found this tip with help of Shopify Support:

In the snippets directory open the product-card.liquid snipped and on line 17 change

{{ product_card_product.url | default: ‘#’ }}

to

{{ product_card_product.url | within: collection | default: ‘#’ }}

That will end up making sure that when you go from a collection to a product by clicking on the product card it includes the collection info in the url.

Thanks to this https://www.reddit.com/r/shopify/comments/paucip/tearing_my_hair_out_dawn_theme/ha7jfrs/

Worked on mine!
Good luck!

2 Likes

how about showing a breadcrumb for when someone comes direct to the prodcut via say google ads? how do we show maybe one of the collection the prodcut is tied to?

1 Like

@fred31

sorry for that

Shopify work this standard code no more

https://shopify.github.io/liquid-code-examples/example/breadcrumb-navigation

Do you mean line 117? I find this code on line 29 and line 117. Do I change both? Or just 117?

I changed both codes and it worked for me!

Hi nice work, this seems to work so far, but I am wondering if you know as well, how this work with a sub-category in a main menu item. Because if you hover over an item of the main menu, it opens a dropdown with sub-categories and if you go to a page, it is showing:

home > product name, rather than home >collection (click/ or hover menu item) > product.

Hope you can assist/ help.

thanks.

Aseasy

Hi

You may follow this video to implement the breadcrumbs smoothly.