How to edit the meta of collections page?

ajuanoba8
Visitor
1 0 1

Hi,

 

I was analyzing my store  with a SEO tool and it appeared a problem.

 

Same metadescription on the home page and the collections page

 

Does anyone here know how to edit the one on a collections page as mine of a Brooklin theme. I guess it will probably require some CSS.

 

Thank you beforehand

Replies 30 (30)

Alex_Lam
Shopify Partner
94 30 26

Shopify has this covered!

 

1. Head over to Product > Collections.

2. Select the collection you want to edit the description of.
3. Scroll to the bottom. Click on Edit website SEO in the Search engine listing preview box.

4. Write a new description for that collection and save.

 

Is your store fast enough? Compare your store's speed against hundreds of others for free with our benchmarker - https://www.rvere.com/
VladBA
Visitor
1 0 7

Hi Alex,

 

First of all, thank you for your answer. Unfortunately, following these steps only help to change the meta description of collections generated manually. 

Shopify automatically generates a page '/collections' which isn't accessible anywhere on the dashboard. This auto-generated page takes the meta-description of the homepage, hence generating an SEO error for pages sharing the same meta description.

Could you please share a solution on how to change the meta description of this autogenerated page?

Many thanks,

Vladimir

Mitchellsmith
Tourist
5 0 7

I'm also looking for a solution to this.

 

Support?

_Peter_
Visitor
1 0 4

Hi everyone! I'm also having the same issue, is there any way to update the root /collection meta ?

WillMaxwell1
Visitor
1 0 0

Same Issue here!

Thanks for your efforts

zippyslothseo
Tourist
4 0 9

This can be achieved by editing the theme.liquid file. I recommend creating a backup first.

If your code looks different you'll need to adapt the code accordingly. You may need to change the template name as well if your theme is using something else. Leave off the .liquid part.

 

Change this:

  {% if page_description %}
     <meta name="description" content="{{ page_description | escape }}">
  {% endif %}

 

To this:

  {% if page_description %}
      {% if template == 'collection-list' %}
          <meta name="description" content="YOUR META DESCRIPTION HERE.">
      {% else %}
          <meta name="description" content="{{ page_description | escape }}">
      {% endif %}
  {% endif %}
 
Allen
Mitchellsmith
Tourist
5 0 7

Thank you so much Allen!!

I was able to implement this change and I think it's working.

Happy Holidays!

zippyslothseo
Tourist
4 0 9

 So glad I could help. Happy holidays!

 

If you wouldn’t mind, could you mark my answer as the solution to help others find it easier?

 

Cheers, Allen @ zippyslothseo.com

getAuriga
Tourist
4 0 5

But this will change the meta data to all collections pages and only the "/all" page is missing the title and meta description... Its incredible that Shopify doesn't allow to easily edit that specific page when is one of the most important ones!!!

zippyslothseo
Tourist
4 0 9
Individual categories should have their own meta and use a different template, not “list”.

If you have multiple that do use the list template- You could add additional if/else if logic to set different metas by category.

Agree that it should be fixed by Shopify.

As always, make sure to test after implementation.
milu_balan
Shopify Partner
60 0 4

Hi @getAuriga 

Did you find Any solutions for this issue?

cristobalgomez2
Shopify Partner
2 0 4

Thank you!

This didnt work for me right out the bat; but after changing the following it worked:

Original:

 {% if page_description %}
      {% if template == 'collection-list' %}
          <meta name="description" content="YOUR META DESCRIPTION HERE.">
      {% else %}
          <meta name="description" content="{{ page_description | escape }}">
      {% endif %}
  {% endif %}


Changed to:

{%- if page_description -%}
  {% if template == 'list-collections' %}
  <meta name="description" content="YOUR META DESCRIPTION HERE">
  {% else %}
    <meta name="description" content="{{ page_description | escape }}">
  {%- endif -%}
  {%- endif -%}
 


Im currently using the Debut theme. IDK if this is why I had to change it but it is now running and working well.


Thank you again!
Javsan
Visitor
1 0 0

It doesn't work for me 😞

Michael140
Shopify Partner
4 0 2

Sadly I have to agree with Javsan — neither the original recommendation or subsequent edit recommendations (e.g., by Cristobalgomez2 above) worked.

 

Agree x 3 (or however many times) that Shopify should allow us to easily change the meta description of the root /Collections page

Scouter
Visitor
1 0 0

Agree with Michael140... Come on, Shopify. Please change this. It's important to those of us who care. 

nellyp
Visitor
1 0 0

This worked for the description thank you but not the title, any ideas why? thanks 

Vlad_BA
Shopify Partner
2 0 0

Hi Cristobal,
Where did add the code? In Section 'collection__main.liquid"? 

LanternSol
Shopify Expert
2 0 0

How do you update the meta title?

Cat_SkillWiz
Visitor
1 0 0

I wanna change it for my collections/all page as well, the indexed page in google shows the first text on the black banner and promo banner. I tried the solution above and replaced 'collection-list' with '/collections/all' , then tried with list-collections-template, then list-collections, collections/all....
None of the above worked, I dont know what the correct term is to put instead collection-list. When I inspect my page it still shows the main page meta description. And any idea why Google indexed it with the text on the page instead of at least the main page meta description? 

https://skillwiz.store/collections/all

Mitchellsmith
Tourist
5 0 7

I had to type in 'list-collections' to properly target my collections list. (www.voltlin.com/collections)

 

{% if template == 'list-collections' %}

DevWise
Shopify Partner
2 0 0

You can use it:

{% if page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% else %}
<meta name="description" content="YOUR CONTENT">
{% endif %}

shqipdonselmani
Shopify Partner
5 0 2

Hi everyone this is the way i made it work

{%- if page_description -%}
  {% if template == 'collection-list' %}
    <meta name="description" content="YOUR META DESCRIPTION HERE">
  {% else %}
    <meta name="description" content="{{ page_description | escape }}">
{%- endif -%}
{%- endif -%}
 
This one is right but with small detail depending on the theme the "list-collections" may be called differently that is the reason why its not working for most of the people.

Thats why go to your code and check for list collection in my case it is named as list-collections
There can be other variations too.

So for me it worked as suggested

{%- if page_description -%}
  {% if template == 'list-collections' %}
    <meta name="description" content="YOUR META DESCRIPTION HERE">
  {% else %}
    <meta name="description" content="{{ page_description | escape }}">
{%- endif -%}
{%- endif -%}

It may seem to some as a duplicate answer just wanted to clarify

shqipdonselmani
Shopify Partner
5 0 2

Hello guys,

I came up with a way around and a good solution

Add this code to settings_schema.json file
{
"name": "Collections Meta",
"settings": [
{
"type": "text",
"label": "Meta Description",
"id": "metadescriptioncollections"
}
]
},

 

It will create a section to the THEME SETTINGS for you to change it

And then on the theme.liquid file change this

  {% if page_description %}
     <meta name="description" content="{{ page_description | escape }}">
  {% endif %}

to this

{%- if page_description -%}
{% if template == 'list-collections' %}
<meta name="description" content="{{ settings.metadescriptioncollections }}">
{% else %}
<meta name="description" content="{{ page_description | escape }}">
{%- endif -%}
{%- endif -%}

In this way we will be able to dynamically change the meta description for the collection page all the time without touching the code anymore



Henry_Bateman
Visitor
2 0 0

This worked brilliantly, thank you, a very neat solution.

 

Only problem is now the page is missing it's H1 heading.

 

Is it possible to add another line of code to be able to input H1 heading in the same way in the theme settings?

shqipdonselmani
Shopify Partner
5 0 2

Hello there,
What do you mean by its missing its H1 heading.
Can you show you case in here and we can try and find a solution.
Have a great day

Henry_Bateman
Visitor
2 0 0
Thanks for the reply, this is what I referring to

Any ideas?


Ben31
Trailblazer
195 8 141

@shqipdonselmani Life saver! Worked perfectly thank you.

Skyscraper
Visitor
1 0 0

I reckon it's depends on theme's template name, but this one worked for me:

 

{% if template == 'list-collections' %}
{% assign page_title = "Page title here" %}
{% assign page_description = "Meta description here." %}
{% else %}
{%- if page_description -%}
<meta name="description" content="{{ page_description | escape }}">
{%- endif -%}
{%- endif -%}

Vlad_BA
Shopify Partner
2 0 0

Hi Skyscraper,

Where would you add this piece of code? At the bottom of the section folder "collection-main liquid" 

jondiego
New Member
9 0 0

Which piece of code?

 

Edit your 'theme.liquid" file by looking for 

 

 {%- if page_description -%}

 

 

that entire section of code should go from 

 

    {%- if page_description -%}
      <meta name="description" content="{{ page_description | escape }}">
    {%- endif -%}

 

to 

 

{%- if page_description -%}
{% if template == 'list-collections' %}
<meta name="description" content="{{ settings.metadescriptioncollections }}">
{% else %}
<meta name="description" content="{{ page_description | escape }}">
{%- endif -%}
{%- endif -%}

 

 

The line where I have "settings.metadescriptioncollections" is because I set a field in the theme settings so it can be managed from there, rather than hard coding it into the theme.liquid file.