Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi,
I have searched the forum and found this question asked in several different ways, but never found a solution on any of the threads.
I am trying to change the title and meta description on my main collections page (pixilated.com/collections) -- without changing anything on the homepage.
Using Shopify 2.0 Dawn Theme
Any ideas?
Thanks,
Nic
Solved! Go to the solution
This is an accepted solution.
Hi @nicolaschina,
Please update it to the below code. It should properly work now.
{% if canonical_url == 'https://your-store-name.myshopify.com/collections' %}
<title>Add your custom title here</title>
<meta name="description" content="Add your custom meta description here">
{% else %}
<title>
{{ page_title }}
{%- if current_tags %} – tagged "{{ current_tags | join: ', ' }}"{% endif -%}
{%- if current_page != 1 %} – Page {{ current_page }}{% endif -%}
{%- unless page_title contains shop.name %} – {{ shop.name }}{% endunless -%}
</title>
{% if page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}
{% endif %}
Let me know if need further assistance
Regards,
Store Watchers Support Team
Hello @nicolaschina,
Greetings from the Store Watchers Support Team! Happy to help you today.
Go to Online Store -> Actions -> Edit code. Then find theme.liquid.
In your theme.liquid file, please paste the code below before the </head> tag.
{% if canonical_url == 'https://your-store-name.myshopify.com/collections' %}
<title>Add your custom title here</title>
<meta name="description" content="Add your custom meta description here">
{% endif %}
Note: Please update 'your-store-name' in the URL with your actual store name.
Also, note that you need to place the code above the <title> tag. Please check the below screenshot for your reference.
Let me know if need further assistance
Regards,
Store Watchers Support Team
Thanks for your solution! Just to be clear, I only want this applied to the page pixilated.com/collections -- not the homepage or any of the specific collections pages (for instance pixilated.com/collections/backdrops).
Also, what is the difference between your solution and the one provided by PageFly-Victor?
Thanks again!
Nic
@StoreWatchers I tried your solution and it worked but caused a new error. Now it looks like there are two titles and two meta descriptions on the page -- pixilated.com/collections
Any suggestions how to fix this?
This is an accepted solution.
Hi @nicolaschina,
Please update it to the below code. It should properly work now.
{% if canonical_url == 'https://your-store-name.myshopify.com/collections' %}
<title>Add your custom title here</title>
<meta name="description" content="Add your custom meta description here">
{% else %}
<title>
{{ page_title }}
{%- if current_tags %} – tagged "{{ current_tags | join: ', ' }}"{% endif -%}
{%- if current_page != 1 %} – Page {{ current_page }}{% endif -%}
{%- unless page_title contains shop.name %} – {{ shop.name }}{% endunless -%}
</title>
{% if page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}
{% endif %}
Let me know if need further assistance
Regards,
Store Watchers Support Team
This worked perfectly. Thank you!
Now you'll see that my homepage: pixilated.com and my all collections page: pixilated.com/collections have different titles and descriptions!
Really appreciatre your help @StoreWatchers
To fix this, I used the following,
{% if canonical_url == 'https://www.enayara.com/collections/all' %}
this doesnt work for me, the homepage and collections page are still the same
>>>>>>>>>>>>>>> Also, note that you need to place the code above the <title> tag.
Check @StoreWatchers' screenshot on his original response for reference.
PLEASE HELP? i have tried this and there is no change
Can this be done without modifying theme code? Where does the title and description of the "/collections" collection list page live in the Shopify Admin? Is it not accessible?
Hello, this option is not working for me. I implemented the code but it is not showing
https://www.wonena.com/collections/
Hi @Nicolaschina,
You can my screenshots
the code is:
{% comment %} new meta {% endcomment %}
{% if template contains "collection" %}
<title>Add your custom title here</title>
<meta name="description" content="Add your custom meta description here">
{% else %}
<title>
{{ page_title }}
{%- if current_tags %} – tagged "{{ current_tags | join: ', ' }}"{% endif -%}
{%- if current_page != 1 %} – Page {{ current_page }}{% endif -%}
{%- unless page_title contains shop.name %} – {{ shop.name }}{% endunless -%}
</title>
{% if page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}
{% endif %}
Hope my solution works perfectly for you!
Best regards,
Victor | PageFly
Thanks for your solution! Please see my reply to StoreWatchers in this thread. I am trying to understand the difference between the two solutions so I can decide which best serves my purpose.
I really appreciate your help!
Thanks,
Nic
@PageFly-Victor your solution worked for the /collection page, but it also applied that same title and meta desciption to all my collection pages, for instance /collections/backdrops , /collections/props , etc.
Any suggestions?
Please elaborate more on this. I don't see "old meta" in the liquid template. Is that new code that over-rides something else? I was able to change the meta description with the code below - but it doesn't change the page title. So frustrating!! https://coralstrands.com/collections
{% if canonical_url == 'https://ed22ba.myshopify.com/collections' %}
<title>Gemstone Jewelry</title>
<meta name="description" content="Discover exquisite gemstone jewelry that enhances your style. Explore our unique collection of handcrafted pieces, perfect for any occasion or gift.">
{% endif %}
<title>
{{ page_title }}
{%- if current_tags %} – tagged "{{ current_tags | join: ', ' }}"{% endif -%}
{%- if current_page != 1 %} – Page {{ current_page }}{% endif -%}
{%- unless page_title contains shop.name %} – {{ shop.name }}{% endunless -%}
</title>
{%- if page_description -%}
{%- if request.path == '/collections' -%}
<meta name="description" content="Discover exquisite gemstone jewelry that enhances your style. Explore our unique collection of handcrafted pieces, perfect for any occasion or gift.">
{%- else -%}
<meta name="description" content="{{ page_description | escape }}">
{%- endif -%}
{%- endif -%}
I hope you are doing good and welcome to the Shopify Community!
I am Santanu from MS Web Designer (Top Rated Shopify Certified Experts and eCommerce Consultant from Singapore).
To change the title and meta description for a Shopify collections page, you can follow these steps:
Log in to your Shopify admin panel and navigate to the "Products" section.
Click on the "Collections" tab.
Click on the collection that you want to edit.
On the collection page, click on the "Edit website SEO" button located on the right-hand side of the page.
In the "Search engine listing preview" section, you can edit the title and meta description.
Edit the title and meta description to accurately reflect the content of the collection.
Click "Save" to apply the changes.
It's important to make sure that your title and meta description accurately represent the content of the collection and contain relevant keywords that can help improve your collection's visibility in search engines.
Regards,
Santanu
If it’s helpful to you, please mark it as a solution.
Need Help with Shopify Design, Migration, Speed, or Custom tasks?
email: hi@mswebdesigner.com
Try Our Conversion Booster app to get more sales | Connect Our Founder Linkedin
I was having an issue with multiple titles showing for all pages after I used the solution.
For reference, I am using the Streamline Theme
So this is what I ended up doing for my solution:
In theme.liquid file
Replaced:
{%- render 'seo-title' -%}
With:
{% if canonical_url == 'https://YOURWEBSITE.com/collections' %} <title>YOUR COLLECTIONS PAGE TITLE</title>
{% else %}
{%- render 'seo-title' -%}
{% endif %}
For description code I have:
{% if page_description %}
{% if template == 'list-collections' %}
<meta name="description" content="YOUR COLLECTIONS PAGE DESCRIPTION">
{% else %}
<meta name="description" content="{{ page_description | escape }} {% if template contains 'collection' %} {% if current_page > 1 %} Page number {{ current_page }} {% endif %} {% endif %}" />
{% endif %}
{% endif %}
Hi I also want adopt the Meta Titel and Meta Description for the /collection page. Is there a recommended solution for this case without any problems? Best regards, Julius.
I know I'm super-late to the party here, but I was also just trying to do this, and the solutions posted here won't actually work well for what I'm doing, since the site I'm working on has multiple markets with language/region identifiers in the URL.
So if you're in the same boat as me, where your URL looks something like this: yourstore.com/en-us/collections (where the "en-us" bit will change, based on the country and language the customer has selected) ...
Then here's the coding you're going to want to use instead:
{% if request.page_type == 'list-collections' %}
<title>{{ 'meta.collections.title' | t }} – {{ shop.name }}</title>
<meta name="description" content="{{ 'meta.collections.description' | t }}">
{% else %}
>>> REST OF YOUR REGULAR <TITLE> STUFF GOES HERE <<<
{% endif %}
Then go into your theme's "locales/en.default.json" file, and add the following:
"meta": {
"collections": {
"title": "ENTER YOUR TITLE HERE",
"description": "ENTER YOUR DESCRIPTION HERE"
}
}
... This way your new title and/or description can be part of your theme's language files (which can then be easily edited via the "default theme content" settings, as well as translated to other languages if you're using translation apps).
Hope this helps! 🙂
★ Did my post help? If yes, then please like and accept solution. ★
https://stephens.world
support@stephensworld.ca