Ljvapes
1
Hi all I have run my netpeak spider app and i have a red error “Duplicate H1” and there are over 1000 in there.
I have the below code in the (collection-header.liquid)
{{ collection.title | split: '|' | first }}
Is this correct as it looks like the collection titles and everything in them is set to H1 and this maybe causing Duplicate H1 tags?
The issue you’re encountering is due to the use of
tags for your collection titles in collection-header.liquid. If every collection page, or even individual collection items, has the same
structure, it could lead to duplicate
tags being flagged by SEO tools like Netpeak Spider.
- For collection pages:
is appropriate for the main collection title (e.g., the title of the entire category).
- For product titles or collection items: These should not use
but could use
or
instead.
exmaple
{% if forloop.first %}
# {{ collection.title }}
{% else %}
## {{ collection.title }}
{% endif %}
Ljvapes
3
Hi thank you very much for the quick response . Is there a way i can edit or amend this ? Any afvise welxome
Ljvapes
4
Good afternoon , Please would you know where i enter the code above that you kindly supplied?
below is my collection-header.liquid file
{% if section.settings.display_image_cat %}
{% if section.settings.img_cat != blank %}
![{{ collection.title | split: '|' | first }}]()
{% else %}
{% capture current %}{% cycle 2%}{% endcapture %}
{{ 'lifestyle-' | append: current | placeholder_svg_tag: 'placeholder-svg' }}
{% endif %}
{% endif %}
{% if settings.enable_multilang %}
{{ collection.title | split: '|' | first }}
{{ collection.title | split: '|' | last }}
{% else %}
{{ collection.title | split: '|' | first }}
{% endif %}
{% if collection.description != ‘’ %}
{% if settings.enable_multilang %}
{{ collection.description | split: '[lang2]' | first }}
{{ collection.description | split: '[lang2]' | last }}
{% else %}
{{ collection.description | split: '[lang2]' | first }}
{% endif %}
{% endif %}
{% schema %}
{
"name": "Collection Header",
"settings": [
{
"type": "checkbox",
"id": "display_image_cat",
"label": "Display Image Category?",
"default": true
},
{
"type": "image_picker",
"id": "img_cat",
"label": "Image Category"
}
]
}
{% endschema %}