If you have a site where you want two category trees, say “Shop by Brand” and “Shop by Part”, then Shopify doesn’t provide an easy way to do that. However, there are some options. This post discusses how we can make the best of the situation.

Single category hierarchy

You can have one section of the tree (think of it as one menu with submenus) that is “Shop by Brand”

  • Dodge
    • Dodge Dakota
      • Dodge Dakota Fog Lights

and a second which is “Shop by Part”

  • Fog Lights
    • Fog Lights made by Dodge
      • Fog Lights for a Dodge Dakota

Note that these collection names and menu items are unique. Shopify doesn’t cope well with duplicates. This video explains why:

Single product

Now you have a new problem. You can have what you want (a single product), but that product is appearing in two collections. Most Shopify themes use short-form URLs like this:

https://uncomplicated.myshopify.com/products/photography-lighting-equipment-sb-n7

which means that if you have a single product in multiple collections, they both come to the same page… which means the same breadcrumb, irrespective of how you got there.

The best solution is themes that create long-form URLs. There aren’t many/any of them any more, so I’ve made a fix in my app.

On your collection page, turn on “Short-link fix” in the settings of the breadcrumb. It will dynamically change out the /products/product-name links for long-form /collections/collection-name/products/product-name links. That means that when a user is in a collection and they click on a product there, they get to a URL that shows what collection they came from. Best of all, because it’s added in javascript, it doesn’t affect the canonical link tag on the target (product) page, as you can see here on my demo site.

To be clear, all these links (long-form and short-form) exist already in Shopify. My short-link fix just points your collections products at the long-form ones.

There’s more information in the Help.

Particularly, this screencast explains it:

SEO

There’s so much nonsense or part-true information shared about SEO, but we can cut through that. Just avoid doing things that Google hates (like the same content on different URLs without a canonical link tag).

Also include JSON-LD, which is metadata that Google reads to understand how a product fits into a category hierarchy. My app has an option, enabled by default, to add this too to every product and collection page:

{
    "@context": "http://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {"@type": "ListItem", "position": 1, "item": {"@id":"/collections/photography","name":"Photography"}},
        {"@type": "ListItem", "position": 2, "item": {"@id":"/collections/photography-lighting-equipment","name":"Lighting equipment"}}
    ]
} 

It’s not perfect, but it’s the best we can do with Shopify.

Mixtures of short-form and long-form URLs

As I say, these long-form and short-form URLs all just exist in Shopify, it’s your choice (or your theme’s choice) which ones you link to.

There is still a situation where you’re using long-form URLs, either created by your theme or by the short-link fix, and a user lands on a short-form URL. For example, Shopify search creates short-form URLs.

The good news is that you still have some control over which breadcrumb shows by default.

Default breadcrumb selection

The Breadcrumb disambiguation on product pages drop-down allows you to choose, for products in multiple collections, which breadcrumb shows.

For most sites, Most specific (smallest collection) is the best option. This means that when someone arrives on a short-form URL page for a product in multiple collections, it chooses the collection with the fewest products. This is generally the most specific collection, i.e. the one that’s the best match for this product, usually a leaf-category in the tree:

  • Dodge
    • Dodge Dakota
      • Dodge Dakota Fog Lights (<– most specific)

This assumes that you’ve put the “Dodge Dakota Fog Lights” in all the leaf-category and also all the parents:

  • Dodge (<– grandparent category)
  • Dodge Dakota (<– parent category)
  • Dodge Dakota Fog Lights (<– leaf category)

Changing the default

The most specific collection will probably be right for 95%+ of your products, but I know there are always some special products where you want to change it. Thankfully, you can!

This video explains how to set the Default Collection Reference for any product:

Summary

All these tools offer ways of controlling your user’s experience when they shop at your store.

Fundamentally, for sites well-index by Google, a substantial number of customers land on a product page. Using these tools you can create a meaningful, category-based breadcrumb that helps guide those customers to see parent collections, they will hopefully contain the products they want to buy. Best of luck with your store!