The code for this breadcrumb shows only the page you are on and prior to that, the homepage, not the pages you have clicked through to get to where you are.
How can I add all the steps to the breadcrumb please?
Also it is left aligned tight to the edge of the page - how can I add a margin please? @paul
I have used the code you published. It works really well. The only thing is that the breadcrumbs come out with numbers, listing the pages visited, one down the other. How to change from numbers to have the breadcrumbs on the same line divided by lines?
Thank you for providing the solution and the code. I have entered the code in my liquid theme, but unfortunately, it only goes back to HOME and doesnât go back to the COLLECTIONS. I do have the part in the code as follows:
{%- when âcollectionâ and collection.handle -%}
{%- if current_tags -%}
For those who have landed on this post and are still looking for a solution, hereâs how to add breadcrumbs to your Shopify Dawn themeâs Product pages. I only wanted to add them on the Product Pages but this code can also be used for other pages with slight modifications. Please refer to the URL at the end.
First, Edit the code and create a new snippet called âbreadcrumbsâ. Add the following code to the snippet:
Next, edit the Default Product Page in the Shopify Theme Customizer (not through the code). In the âCustom Liquidâ section, use â{% render âbreadcrumbsâ %}â to render the snippet below the header.
Finally, Edit the code again and write CSS rules for styling in the âbase.cssâ file by using â.breadcrumbâ class as a reference.