Breadcrum doesn't show collection - help with code

Topic summary

Main issue: Breadcrumb navigation isn’t displaying the product’s collection, even though the product belongs to a collection.

Context and code provided:

  • The user shared a Liquid snippet (Shopify theme template language) controlling breadcrumbs.
  • Variables: sets search_category to blank by default and show_breadcrumbs to true.
  • Inside the conditional, it captures cat_array from the ‘advanced-tag-loop’ snippet and splits it by “|”.
  • It also captures a delimiter using the ‘icon-chevron-down-thin’ snippet.
  • The snippet shown stops before any logic that outputs the breadcrumb trail or links to the product’s collection.

Key terms:

  • Breadcrumb: a navigation path showing page hierarchy (e.g., Home > Collection > Product).
  • Collection: a Shopify grouping of products.
  • Liquid: Shopify’s templating language.

Current status:

  • No proposed fix or diagnosis yet; only the setup code is shown.
  • No decisions or outcomes; the thread is open and seeking guidance on how to make the collection appear in the breadcrumb.

Note: The code snippet is central to understanding the issue.

Summarized with AI on February 23. AI used: gpt-5.

The collection doesn’t show in breadcrumb, even though product has a collection. This is what the breadcrum code looks like, what do I do?

{% assign search_category = search_category | default: blank %}
{% assign show_breadcrumbs = true %}

{% if show_breadcrumbs %}
  {% capture cat_array %}{%- render 'advanced-tag-loop' -%}{% endcapture %}
  {% assign cat_array = cat_array | split: '|' %}

  {%- capture delimiter -%}
    
      {% render 'icon-chevron-down-thin' %}
    
  {%- endcapture -%}

  
{% endif %}