How to edit the meta of collections page?

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

2 Likes

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.

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

11 Likes

I’m also looking for a solution to this.

Support?

5 Likes

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

5 Likes

Same Issue here!

Thanks for your efforts

1 Like

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 %}

{% endif %}

To this:

{% if page_description %}
{% if template == ‘collection-list’ %}

{% else %}

{% endif %}
{% endif %}

Allen

8 Likes

Thank you so much Allen!!

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

Happy Holidays!

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

{% if template == ‘list-collections’ %}

2 Likes

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 [email removed] zippyslothseo.com

2 Likes

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!!!

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.

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’ %}

{% else %}

{% endif %}
{% endif %}

Changed to:

{%- if page_description -%}
{% if template == ‘list-collections’ %}

{% else %}

{%- 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!

5 Likes

It doesn’t work for me :disappointed_face:

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

1 Like

How do you update the meta title?

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

You can use it:

{% if page_description %}

{% else %}

{% endif %}

Hi everyone this is the way i made it work

{%- if page_description -%}
{% if template == ‘collection-list’ %}

{% else %}

{%- 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’ %}

{% else %}

{%- endif -%}
{%- endif -%}

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

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 %}

{% endif %}

to this

{%- if page_description -%}
{% if template == ‘list-collections’ %}

{% else %}

{%- 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

2 Likes