Hi,
The tags on my blog are causing duplicate meta descriptions. I am using the minimal theme - how do I resolve this?
Any help would be much appreciated.
Jenny
Use the following code:
{% if page_description != blank and blog.tags == blank %}
<meta name="description" content="{{ page_description | escape }}">
{% elsif blog.tags != blank and page_description == blank %}
{% for article in blog.articles %}
<meta name="description" content="{{ article.excerpt | truncate: '150' }}">
{% endfor %}
{% else %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}
Replace the code in theme.liquid:
{% if page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}
The complete code can be downloaded from https://www.lelinta.com/products/shopify-technical-seo
User | Count |
---|---|
449 | |
191 | |
138 | |
61 | |
41 |