Duplicate Meta description on Collections page

New Member
16 0 0

Hi Guys, 

I have seen this problem before but no answer. I have duplicate meta description on my collections page which is auto-generated from the home page. There is no obvious way to add it like other pages. Does anyone know of a piece of code I can add so I can add my own meta description and title to the collection page? See the page here: https://thewhitekitchencompany.com/collections

0 Likes
Shopify Expert
2514 423 533

Hi @pacarter11 

I have checked on this collection page and see its only one meta description, have you solved it or send me screenshot if you get two.  

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
New Member
16 0 0

HI, Sorry I didn't explain correctly. The Collections page meta description is the same as the homepage as It's auto-generated.

I want to be able to add a unique meta description to the page, but there is no easy way to do this like the other pages.

0 Likes
Shopify Expert
2514 423 533

if you want to add different description for collection page then add condition like bellow:

Add this in Layout->theme.liquid file->fine existing meta description with this 

{% if template contains 'collection' %}
    <meta name="description" content="your collection page meta" />
{% else %}
  //add your existing meta
{% endif %}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
16 0 0

Thank you for answering me, I really appreciate it.

I have added your suggestion in my theme.liquid page in the head, it picks the new meta description on the collection page now but the meta description on the homepage disappears completely. This is the code I added:

 

 {% if template contains 'collection' %}
<meta name="description" content="Shop for your Shaker or Period English solid wood kitchen cabinets - Handmade to order, buy on-line - DIY Kitchens" />
{% else %}
//Handmade Bespoke Kitchens in Classic English and Shaker Kitchen Styles. Fitted and Freestanding Units | Northampton Showroom | Worldwide Online Shop
{% endif %}

 

Also, I need to do the same with the meta title, so what code would I use for that?

0 Likes
Shopify Expert
2514 423 533

Replace with this:

 

{% if template contains 'collection' %}
<meta name="description" content="Shop for your Shaker or Period English solid wood kitchen cabinets - Handmade to order, buy on-line - DIY Kitchens" />
{% else %}
<meta name="description" content="Handmade Bespoke Kitchens in Classic English and Shaker Kitchen Styles. Fitted and Freestanding Units | Northampton Showroom | Worldwide Online Shop" /> {% endif %}

 

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
New Member
16 0 0
Thats great and it works, What about the meta title, how do I incorporate that too with the code?
0 Likes
Shopify Expert
2514 423 533

You can use in same condition

{% if template contains 'collection' %}
<meta name="description" content="Shop for your Shaker or Period English solid wood kitchen cabinets - Handmade to order, buy on-line - DIY Kitchens" />
.....add your other meta for collection page {% else %}
<meta name="description" content="Handmade Bespoke Kitchens in Classic English and Shaker Kitchen Styles. Fitted and Freestanding Units | Northampton Showroom | Worldwide Online Shop" />
.....add your other meta for home page
{% endif %}
Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
New Member
16 0 0
Hi Jasoliya,

Thank you for getting back to me.

I have implemented the new code you gave me and added the title tag like this:

{% if template contains 'collection' %} <meta name="description" content="Shop for your Shaker or Period English solid wood kitchen cabinets - Handmade to order, buy on-line - DIY Kitchens" />
DIY KItchens Buy Online | Quality Solid Wood Kitchens | SHOP Now{% else %}
<meta name="description" content="Handmade Bespoke Kitchens in Classic English and Shaker Kitchen Styles. Fitted and Freestanding Units | Northampton Showroom | Worldwide Online Shop" />
DIY KItchens Buy Online | Quality Solid Wood Kitchens | SHOP Now{% endif %}

But now it shows two title tags, the original one “collections” and the new one. How to I remove the old one?

Paula :)



0 Likes
New Member
16 0 0

**UP-DATE**

 

I have this code in the site now:


{% if current_tags %}{% assign meta_tags = current_tags | join: ', ' %}{% endif %}
<title>{% if template contains "index" %}{{ page_title }}{% else %}{{ page_title }}{% if current_tags %} {{ 'general.meta.tagged_html' | t: tags: meta_tags }}{% endif %}{% if current_page != 1 %} {{ 'general.meta.page' | t: page_number: current_page }}{% endif %}{% endif %}</title>


{% if template contains 'collection' %} <meta name="description" content="Shop for your Shaker or Period English solid wood kitchen cabinets - Handmade to order, buy on-line - DIY Kitchens" />
<title>DIY KItchens Buy Online | Quality Solid Wood Kitchens | SHOP Now</title> {% else %}
<meta name="description" content="{{ page_description | escape }}" />
{% endif %}

 

Problems:

1. Now I have two title tags on the collections page

2. I have added the unique meta description on the collection page (so I had no meta duplications for SEO) but now I have further duplications on all the pages that have /collection/ in the url for example: 

Which I cannot have as it is now worse than before.
3. When I added the code you gave me, it turned every meta description on everypage the same (Handmade Bespoke Kitchens in Classic English and Shaker Kitchen Styles. Fitted and Freestanding Units | Northampton Showroom | Worldwide Online Shop).
0 Likes