Liquid, JavaScript, themes, sales channels
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
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
I'm also looking for a solution to this.
Support?
Hi everyone! I'm also having the same issue, is there any way to update the root /collection meta ?
Same Issue here!
Thanks for your efforts
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:
To this:
Thank you so much Allen!!
I was able to implement this change and I think it's working.
Happy Holidays!
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
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!!!
Thank you!
This didnt work for me right out the bat; but after changing the following it worked:
Original:
It doesn't work for me 😞
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
This worked for the description thank you but not the title, any ideas why? thanks
Hi Cristobal,
Where did add the code? In Section 'collection__main.liquid"?
How do you update the meta title?
I had to type in 'list-collections' to properly target my collections list. (www.voltlin.com/collections)
{% if template == 'list-collections' %}
You can use it:
{% if page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% else %}
<meta name="description" content="YOUR CONTENT">
{% endif %}
Hi everyone this is the way i made it work
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
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?
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
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 -%}
Hi Skyscraper,
Where would you add this piece of code? At the bottom of the section folder "collection-main liquid"
User | RANK |
---|---|
38 | |
30 | |
12 | |
12 | |
8 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023