the tags on my blog are causing duplicate meta description

arcform
Tourist
28 0 1

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

www.studioarcform.com

0 Likes
Lelinta
New Member
3 0 0

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

Shopify partners, also have own shopify stores
0 Likes