Category Breadcrumbs

Getting started

In order to get the most out of Category Breadcrumbs, you first need to set up your store with Products, Collections and Navigation. This screencast walks you through the process, including how to set up the menu items that form your categories.

Get support for Category Breadcrumbs

If you send an email to the address below, you'll first get an automated response asking for specific information about your store. Please reply to that with the requested details so I can respond directly to you.

I always respond. If you don't get a response, please check your SPAM filter carefully as a response is always sent to you. Your replying to that response is crucial to ensure that my next message to you does not get caught in your SPAM filter.


Installing in older (1.0) themes

For older themes only, this app provides an embed, a small piece of code that you need to include in your theme, to implement the breadcrumbs.

For older 1.0 themes, some coding experience is required. If you're unfamiliar with coding, I strongly recommend avoiding legacy 1.0 themes and sticking with the default 2.0 themes. These legacy themes are based on .liquid files and they are all arranged differently. This video shows how to code in the embed for the old default 1.0 theme, but your theme will not be organised identically.

You should back up your theme before making any changes to it.

Open up your current theme in the Shopify Admin interface. Select the appropriate liquid file for your theme, sometimes collection.liquid, for editing.

Identify where your current breadcrumb is generated - you can insert some mock text (such as MOCKMOCKMOCK) first to check that you've found the right place. Replace it carefully by pasting this single line of code below into the place in your document where you'd like to show a full category breadcrumb.

{% include 'uncomplicated.categories.catbread' %}

Installing in 2.0 themes

This app uses Shopify's Theme editor to give you control over how the breadcrumb looks and where it's positioned. We provide this screencast to make your journey through the process really easy.

For the standard 'Dawn' theme and all modern Shopify 2.0 themes like it, please follow the instructions in the Using the Shopify Theme Editor video.

Open up your current theme in the Shopify Theme Editor interface.

Select the 'Default collection' from the template selector. Use the theme editor to place the category-breadcrumbs block into your theme. Optionally repeat the process for the 'Default product'.


Reduce title length on product pages

Sometimes the product title is very long, which can make the breadcrumb seem unwieldy. You can control how the product title gets truncated, i.e. when the characters are curtailed with an ellipsis (...), using an optional variable in the embed that you insert into your theme.

  • By default, the product title in the breadcrumb will get truncated (with `...`) after 28 characters.
  • To truncate after a different number of characters, set truncate_limit to another integer value, say 40 character.
  • To disable truncation altogether and show the full product title, set truncate_limit to -1. For example:

{% include 'uncomplicated.categories.catbread', truncate_limit: 40 %}

Search engine optimisation using JSON-LD

Special markup is included to help search engines understand the structure of your categories. This article from Google explains more about it.

In exceedingly rare circumstance, you might want another app to generate and manage this JSON-LD metadata.

You can disable the addition of JSON-LD using the disable_jsonld flag, for example:

{% include 'uncomplicated.categories.catbread', disable_jsonld:true %}

If you use multiple category embeds, such as the category list, please ensure that you add this disable_jsonld flag to all of them.

Removing 'All products' from non-collection breadcrumbs

It's always better to use collection-based URLs (see above), but you can still modify the breadcrumb using CSS.

If you'd like to hide the 'All products' entry, add this CSS snippet to a theme file (not uncomplicated...css):

a[title="All Products"], span#uncomplicated-category-breadcrumb-top-separator.breadcrumb__allproducts { display: none; }

Controlling guesses for non-collection breadcrumbs for 1.0 themes

Using modern (2.0) themes, guessing for non-collection breadcrumbs is controlled through the settings (see Showing breadcrumbs on product pages). The advice here applies only to older 1.0 themes, and even then only those that use short-form URLs (not recommended).

Shopify provides an unordered list of collections that this product appears in. This app has no control of the order of the list and by default it uses the first entry to base the breadcrumb on. By including a flag in the embed code, you can select to use:

  • 'first': the first possible breadcrumb from that list (default)
  • 'last': the last possible breadcrumb from that list
  • 'generic': create a generic breadcrumb of the form Home > All Products > Product name

{% include 'uncomplicated.categories.catbread', prod_multicat_sel:"last" %}

{% include 'uncomplicated.categories.catbread', prod_multicat_sel:"generic", text_catall:"All Products", link_catall:"/collections/all" %}

How to customise the look of your breadcrumb for 1.0 themes

The look of the breadcrumb is entirely controlled by your theme. The colours or styles may vary in different parts of the template, and across different templates, but they are all controlled by the current theme.

You can override your theme's styles by placing CSS into one of your theme's .scss or .css files. Please do not change the uncomplicated...css files as they are dynamically regenerated.

For example, if you want to adjust the spacing between the separators ('>'), you might add this CSS to your theme:

span.breadcrumb__sep {
    margin-left: 0.3em;
    margin-right: 0.3em;

Translating parts of the breadcrumb

Most of the breadcrumb is made up of product names that you control through the Shopify product catalogue, with two exceptions:

  • The breadcrumb root (defaults to 'Home'), which can be configured with:
    • text_catroot - the text that's displayed at the root of the breadcrumb
    • link_catroot - the link target when users click the root of the breadcrumb
  • The first and only breadcrumb (defaults to 'All products'), which can be configured with:
    • text_catall - the text that's displayed when no collection is included in the URL
    • link_catall - the link target when users click the first breadcrumb

For example, a highly customised breadcrumb embed might look like:

{% include 'uncomplicated.categories.catbread', text_catroot:"Root", link_catroot:"/collections/all", text_catall:"My products", link_catall:"/collections/all" %}

If you wish to hide any part of the breadcrumb, you can disable it using display:none in CSS.

Optionally you may like to make the final breadcrumb plain text, rather than a link to the current page unfiltered. To display the final breadcrumb without a link, append show_finalbread_as_textonly to your list of embed arguments:

{% include 'uncomplicated.categories.catbread', show_finalbread_as_textonly: true %}

More video to help you get older (1.0) themes set up

Showing breadcrumbs on product pages

You can also show category breadcrumbs on your product pages. Because each product could belong to multiple collections, we need a way of identifying which collection you want the product to appear in and therefore which breadcrumb to display. This best way to do this is using long-form URLs:

  • Links of the form /collection/collection_name/product/product_name, like this one will show the correct breadcrumb.
  • Links without collection, or short-form URLs like this one, don't indicate which collection you're in so force Shopify to guess. There's an unsubstantiated rumour that short-form URLs are better for SEO, because they avoid duplicate content, but that's better done using long-form URLs with rel="canonical" as Shopify recommends in this Best Practices post.

Links are generated by your theme, so if you click on products in a collection and browse to a product page with a short-form URL, that problem is created by your theme. The best place to fix it is the theme, but you can use this short-form link fix in your embed as a poorer alternative. It tries as best it can to detect short-form links on collection pages and automatically rewrite them. This screencast explains:

{% include 'uncomplicated.categories.catbread', insert_shortlinkfix:true %}

The short-form link fix is available as a tick-box option for 2.0 themes in the Shopify Theme Editor, under Category Breadcrumb settings on the Default Collection page. Even with this fix, it's still possible get to short-form URLs and on those pages you need to display a breadcrumb. By default, Shopify makes available an unordered list of collections as metafields, which this app uses to try to guess the right breadcrumb.

Remember, if using short-form URLs, a product can only have one breadcrumb. Most of the time, the default breadcrumb for a product is the one that belongs to the Most specific collection (the default), though you can tell it to guess differently using the Category Breadcrumbs settings on the Default Product page. Now this is a guess, it won't be the right collection every time, but it's a workaround if you have a theme that does not produce long-form URLs.

Finally if you want to choose a different default parent collection for specific products, say where the guess isn't the one you want, and your theme produces short-form URLs, you can set a custom Product metafield for Default Collection Reference (called custom.default_collection_reference) on each Product that references a single Collection:

Default Collection Handle (custom.default_collection_handle) is also still supported. Note that the collection handle is not the name, but the handle, e.g. technology-mobile-phones-smart-phones for this collection. This workaround is not highly recommended because it's manual and fiddly, but it is reliable. The steps are outlined in this screencast:

How to customise the look of your breadcrumb for 2.0 themes

The look of the breadcrumb is entirely controlled by your theme. The colours or styles may vary in different parts of the template, and across different templates, but they are all controlled by the current theme.

You can override your theme's styles using a Custom Liquid block. This screencast explains the process step-by-step:

Apply custom styles in Shopify Theme Editor to make your storefront look just right
[4 minute screencast]

For example, if you wanted the font to be bold, black and not underlined, you might use this custom code:

nav.category-breadcrumbs a {
    font-weight: bold;
    color: black;
    text-decoration: none;

More video to help you get 2.0 themes set up