How to add breadcrumb navigation to your Shopify store theme

Topic summary

The original post provides a step-by-step tutorial for manually adding breadcrumb navigation to Shopify stores to improve user navigation and reduce confusion when browsing products.

Implementation Steps:

  • Create a new snippet file called breadcrumbs.liquid
  • Add provided Liquid code to the snippet
  • Include the snippet in theme.liquid (or layout.liquid)
  • Add CSS styling to theme’s stylesheet
  • Enable breadcrumbs through theme settings

Common Issues Reported:

  • Mobile responsiveness: Breadcrumbs display incorrectly on mobile devices
  • File location confusion: Users struggle to find layout.liquid or appropriate CSS files (varies by theme)
  • Theme 2.0 compatibility: Instructions don’t fully align with newer Shopify themes using base.css instead of theme.css
  • Incomplete breadcrumb paths: Several users report breadcrumbs only showing “Home > Current Page” instead of the full navigation hierarchy (Home > Collection > Product)
  • Whitespace issues: Adding breadcrumbs creates unwanted spacing below headers

Status: The discussion remains open with unresolved questions about collection-level breadcrumbs and theme-specific implementation challenges. One user suggests a third-party app as an alternative code-free solution.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Have you ever been lost on a website? You are looking for a product to buy online and come across an online store that sells the product you were looking for. You wanted to see what else the store offered, from page to page you finally decided to buy another product you had seen a few minutes earlier.

Unfortunately, you couldn’t find the product easily because you felt lost among all those dozens of products that the site offers. How did you feel? Imagine how you felt at that moment. Well, you should know that your customers feel more than twice as much as you did.

This is where breadcrumb navigation comes in. They are there to make it easier for your customers to navigate through your online store without feeling lost.

To add breadcrumb navigation to your Shopify store theme, follow the next steps below.

Step 1: Open the code editor

  • From your Shopify admin, go to Online Store > Themes.
  • Click Actions > Edit code.

The code editor shows a directory of theme files on the left, and a space to view and edit the files on the right.

Step 2: Generate a brand-new snippet for the breadcrumbs code

In the snippets’ directory create a new file called breadcrumbs.liquid

![Add a snippet of the breadcrumb code|1355x467](upload://sHcwp8dpIjeAUgejhr5M9gaWJm0.png)

Step 3: Copy the Liquid code given below and paste it into the code editor for the breadcrumbs.liquid snippet

{% unless template == 'index' or template == 'cart' or template == 'list-collections' or template == '404' %}

{% assign t = template | split: '.' | first %}

{% endunless %}

Hit Save to get your changes confirmed and applied to breadcrumbs.liquid.

Step 4: Add the snippet into layout.liquid

{% include 'breadcrumbs' %}

Tap theme.liquid to open it in the code editor. Include the snippet for all the pages of our site. The best place to output the breadcrumb snippet is above {{ content_for_layout }} in the theme.liquid file, just inside your main content wrapper. To output our breadcrumbs’ snippet, add the above code where you wish them to appear and hit Save:

Step 5: Adding CSS (Styles) breadcrumb navigation code

Add the following CSS to the bottom of theme.css.liquid or theme.css, and hit Save, to style the breadcrumbs we’ve made. The name of the stylesheet can vary for different themes, so if you cannot find theme.scss.liquid, then look for one of the following:

  • style.scss.liquid or style.css
  • styles.scss.liquid or styles.css
  • theme.css.liquid or theme.css
  • timber.scss.liquid or timber.css
/* Breadcrumbs' styles */
.breadcrumbs {
  font-size: .85em;
  margin: 0 0 2em;
}

.breadcrumbs ol {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: inline-block;
}

.breadcrumbs a {
  text-decoration: underline;
}

.breadcrumbs li:not(:last-child):after {  
  content: "›\00a0";
  display: inline-block;
  padding-left: .75ch;
  speak: none;
  vertical-align: middle;
}

.breadcrumbs [aria-current="page"] {
  color: inherit;
  font-weight: normal;
  text-decoration: none;
}

.breadcrumbs [aria-current="page"]:hover,
.breadcrumbs [aria-current="page"]:focus {
  text-decoration: underline;
}

Congratulations! Once you have completed step 5, you can consider that your breadcrumb is already up and running. The next step is optional and will give you the power to enable/disable your breadcrumbs at will.

Step 6: Giving to yourself the power to enable/disable breadcrumb navigation globally on your website (Optional)

Instead of adding {% include ‘breadcrumbs’ %} as specified in step 4, add the below snippet:

{% if settings.show_breadcrumb_nav %}
  {% include 'breadcrumbs' %}
{% endif %}

Then inside your settings_schema.json file, located in the config directory of your theme, add the following setting for Navigation:

{
    "name": "Navigation",
    "settings": [
      {
        "type": "checkbox",
        "id": "show_breadcrumb_nav",
        "label": "Show breadcrumb navigation"
      }
    ]
  },

To enable/disable globally your breadcrumb, follow the lines specified below:

  • From your Shopify admin, go to Online Store > Themes.
  • Find the theme that you want to edit, and then click Customize.

When you first open the theme editor, the sections for the home page are shown like specified below, hit Theme Settings:

From the Theme Settings page, Hit Navigation like below:

From the Navigation page, enable/disable Breadcrumb and hit Save like below:

See an overview of what we have built:

At Accomplishify, a Shopify eCommerce development company in Melbourne, we hope following this resource helps provide you better user experience on your Shopify store. The journey ends here for this tutorial. But this was just one more step for you in the race to make your online store better. Here are some other tutorials to help you in your race.

If you have any questions, don’t hesitate to contact us, either from the contact section.

2 Likes

Hi Michal, you are one of the best that gives a very comprehensive “Free Tutorial” on how to insert breadcrumb. Bless you. I did follow your instructions., for website viewing it works flawlessly however for mobile view it did not. Kindly see attached. I hope you can kindly help me with this. Thank you

1 Like

Hi

Thanks for this tutorial on breadcrumbs.

Unfortunately, I got stuck on Step 4: Step 4: Add the snippet into layout.liquid

Where is layout.liquid?

Searched the phrase, but no joy.

Any idea?

Many thanks

Martin Hoile

Didnt work. received error. i use 2.0 and there is no theme.ss only base.css. i guess it doesnt like it there. I tried contacting your company and your website does not work

Hi, your instruction work really good. Is there a possibility to adjust the postion of the breadcrubms on the page? I want to align the breadcrumbs to the logo.

hi, thanks for this excellent solution for breadcrumbs. we need some help to set it for the Spotlight theme.
when we navigate from the homepage to the collection to product page. we see only home>product page. please help me

Make sure you pasted in the right CSS file. Mine was named base.css

For step 5, I don’t have anything with any of these labels…

  • style.scss.liquid or style.css
  • styles.scss.liquid or styles.css
  • theme.css.liquid or theme.css
  • timber.scss.liquid or timber.css

I’m using the Sense theme. I have one labeled base.css but if that’s the one, I don’t see where I could put the code.

Adding it to the bottom of the base.css file worked!

However, the bread crumbs only show the page its’ currently on and the home page, no matter how deep into navigation I am.

Hello,

Great guide, thanks.

Is it possible to add the collection before the product?
I like to have Home>Collections>Products

Thanks

I was able to add the breadcrumbs to the website. However the homepage now has a large whitespace below the header. Any idea what might be going on?

In the CSS file you pasted the styles in step 5
remove the margin added to the first rule
.breadcrumbs {
margin: 0 0 2em;

}
to

Yes, same here, would be great to have home > collection > products
Is it possible? seems a while ago somebody wrote in this thread.

Hi @petit2

If you’re still looking for a breadcrumb solution — especially one that works well with nested or custom collections — you might want to try our app FDL Breadcrumbs & Collections.

It lets you create breadcrumbs and sub-collections visually with drag-and-drop, no code needed. Works well for large catalogs too.

Hope this helps!