Liquid, JavaScript, themes, sales channels
Hello!
I have the below code in my breadcrumb.liquid snippet. However, when running the code through on Google Search Console it says that the page is not eligible for rich results known by this test. Any advise on how to get the code eligible for rich results? Currently using the Minimal theme.
Thanks!
{% comment %}
Documentation - http://docs.shopify.com/support/your-website/navigation/creating-a-breadcrumb-navigation
{% endcomment %}
{% unless request.page_type == 'index' or request.page_type == 'cart' %}
<nav class="breadcrumb" role="navigation" aria-label="breadcrumbs">
<a href="{{ routes.root_url }}" title="{{ 'general.breadcrumbs.home_link_title' | t }}">{{ 'general.breadcrumbs.home' | t }}</a>
{% if request.page_type == 'product' %}
{% if collection %}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
{% if collection.handle %}
{%- if collection.url == blank -%}
{% assign url = routes.all_products_collection_url %}
{%- else -%}
{% assign url = collection.url %}
{%- endif -%}
{{ collection.title | link_to: url }}
{% endif %}
{% endif %}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
<span>{{ product.title }}</span>
{% elsif request.page_type == 'collection' and collection.handle %}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
{% if current_tags %}
{%- if collection.url == blank -%}
{% assign url = routes.all_products_collection_url %}
{%- else -%}
{% assign url = collection.url %}
{%- endif -%}
{{ collection.title | link_to: url }}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
<span>{{ current_tags | join: " + " }}</span>
{% else %}
<span>{{ collection.title }}</span>
{% endif %}
{% elsif request.page_type == 'blog' %}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
{% if current_tags %}
{{ blog.title | link_to: blog.url }}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
<span>{{ current_tags | join: " + " }}</span>
{% else %}
<span>{{ blog.title }}</span>
{% endif %}
{% elsif request.page_type == 'article' %}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
{{ blog.title | link_to: blog.url }}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
<span>{{ article.title }}</span>
{% elsif request.page_type == 'page' %}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
<span>{{ page.title }}</span>
{% else %}
<span aria-hidden="true" class="breadcrumb__sep">›</span>
<span>{{ page_title }}</span>
{% endif %}
</nav>
{% endunless %}
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024