Changing Meta description and title on collection page only (in theme code)

Highlighted
Tourist
17 0 1

Hi,

I am trying to change the meta description and title on the collection page ONLY.

 

I am trying this piece of code (in the theme.liquid) but its not working and I am not sure why:

{% if template contains 'collection' and collection.url == '/collections/' %} <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 %}

 

I did try 

    {% if template contains 'collection' %} which worked but it also changed every page after the trailing slash (for example /collections/larder-cupboard). But I only want to change this page. Can anyone help?

0 Likes
Highlighted

Hello ,
Please share your site url.
So that i can check and provide you exact solution here.

Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
Tourist
17 0 1

Sorry durrhh!

 

The page in question is: https://thewhitekitchencompany.com/collections

0 Likes
Highlighted

I think you should ask questions on deeply related websites about IT, there are those who specialize in programming who will help you fix this error better.

0 Likes
Highlighted
Tourist
17 0 1
0 Likes
Highlighted

Hi Pacarter11,

To update the meta-information of your "collections" page, simply update the meta-information of the "Home Page" of your store.

To update the optimised meta information of the Home Page of your store, simply:

Online Store---> Preferences--> Home Page.

Relax and remember that the meta-information on the Home Page will automatically reflect on the "collections" page.

Shubhihasani
0 Likes
Highlighted

Are you trying to change it so that

  1. Every new collections in the future has the same meta description or
  2. Just this one particular page?

If it is number (2), head to this page, scroll to "Search engine listing preview" and edit this part.

Screenshot 2019-12-18 at 4.07.12 PM.png

Working on...
1. Product Lens (App that helps the middle of the funnel marketing)
2. Strategy + Tactics: Marketing Blog
3. Want store feedback? Try this free tool (You gotta give to receive)
4. 60-day SEO email course
5. FB Marketing 102 email newsletter
0 Likes
Highlighted
Tourist
17 0 1

Hi 

I work in SEO and I am trying to stop Duplicate meta descriptions that are harming the site. I want the collections page to have its own unique meta title and description, not pulling from the home page.

 

Is this possible? I have been trying to sort this out for two weeks and it seems nobody has a solution. I know this is possible in wordpress with wo-commerce. Shopify seems less flexible.

0 Likes
Highlighted
Tourist
17 0 1

Hi 

Thanks for replying. Yes, that would be much easier, but the Collection page is a template, not a page, so a bit of coding is required. ;)

We should have the flexibility to do this, but I am finding Shopify to be quite restrictive for proper SEO to be implemented when so many pages become duplicate content when pulled from the homepage.

0 Likes
Highlighted

Are you using a custom theme?

 

Working on...
1. Product Lens (App that helps the middle of the funnel marketing)
2. Strategy + Tactics: Marketing Blog
3. Want store feedback? Try this free tool (You gotta give to receive)
4. 60-day SEO email course
5. FB Marketing 102 email newsletter
0 Likes