How can I correctly add breadcrumbs to the Crave theme?

Trying to add breadcrumbs to Crave but having a little trouble.

I’m using this code


but the {{ product.type | handlesize}} is messing me up..

I get this: Home/Greeting Card/product name

When what I need is: Home/Collection name/sub-collection name/product name

I’ve tried a few things but I’m a total newbie to liquid…

Hi @Marju-Milan ,

You can try with the following code: https://pastebin.com/WHXTkyhv

Hope it helps!

Thank you @LitCommerce that doesn’t do it either.

I’m trying to get it to show like this:

Home>Collection>Sub-collection

(Without product name, the names are way too long!)

Every version of code I’ve found and tried either put product type in or is like the code supplied…

Hi @Marju-Milan ,

Shopify currently does not support sub collection, how do you want it displayed? Can you explain more about sub collection? I will help you check it

Thank you.

I discovered no support for sub-collections after I had mapped everything out on paper :disappointed_face:

So, essentially, my “sub-collections” are just collections, but accessed through another collection.

Example:

Brother Birthday Cards are accessed through For His Birthday which in turn is accessed through Birthday Cards.
Birthday Cards> For His Birthday> Brother Birthday Cards

But, also from For His Birthday you can access Father Birthday Cards.

The attached image might make more sense…

Hi @Marju-Milan ,

This is impossible. You can just install app for it, refer: https://apps.shopify.com/category-breadcrumbs-uncomplicated

Hope it helps!

@LitCommerce I was worried it might not be possible.

That app looks perfect.

thank you for your help.

1 Like

Hello,

Can you please tell us how we can use the block of code that you sent?

Thanks!

Hello,

Nevermind, I know how to do it, so I will write here for others that might come across this:

  1. create a “breadcrumbs.liquid” inside sections folder of your site code.

  2. output the newly created section where you need it: {% section ‘breadcrumbs’ %}

Hope this helps.