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

How to change title and meta description of /collections page?

Solved

How to change title and meta description of /collections page?

nicolaschina
Excursionist
16 0 4

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

Accepted Solution (1)
StoreWatchers
Trailblazer
205 30 39

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 %} &ndash; tagged "{{ current_tags | join: ', ' }}"{% endif -%}
	{%- if current_page != 1 %} &ndash; Page {{ current_page }}{% endif -%}
	{%- unless page_title contains shop.name %} &ndash; {{ 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

StoreWatchers - Automate testing for your Shopify store in seconds


If you find my reply helpful, please hit Like and Mark as Solution
Visit us: App Store | Website | FAQs

View solution in original post

Replies 20 (20)

StoreWatchers
Trailblazer
205 30 39

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.

 

online-store.JPG


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.

 

code.JPG

 

Let me know if need further assistance

Regards,
Store Watchers Support Team

StoreWatchers - Automate testing for your Shopify store in seconds


If you find my reply helpful, please hit Like and Mark as Solution
Visit us: App Store | Website | FAQs
nicolaschina
Excursionist
16 0 4

@StoreWatchers 

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

nicolaschina
Excursionist
16 0 4

@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?

 

StoreWatchers
Trailblazer
205 30 39

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 %} &ndash; tagged "{{ current_tags | join: ', ' }}"{% endif -%}
	{%- if current_page != 1 %} &ndash; Page {{ current_page }}{% endif -%}
	{%- unless page_title contains shop.name %} &ndash; {{ 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

StoreWatchers - Automate testing for your Shopify store in seconds


If you find my reply helpful, please hit Like and Mark as Solution
Visit us: App Store | Website | FAQs
nicolaschina
Excursionist
16 0 4

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 

Enayara
Visitor
2 0 0

To fix this, I used the following,

{% if canonical_url == 'https://www.enayara.com/collections/all' %}

georgeglossop
Tourist
4 0 4

this doesnt work for me, the homepage and collections page are still the same

marcvi1a
Visitor
1 0 0

>>>>>>>>>>>>>>> Also, note that you need to place the code above the <title> tag.

 

Check @StoreWatchers' screenshot on his original response for reference.

georgeglossop
Tourist
4 0 4

PLEASE HELP? i have tried this and there is no change

greg-gkr
Shopify Partner
24 0 9

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?

wonena-dev
Shopify Partner
27 0 8

Hello, this option is not working for me. I implemented the code but it is not showing 

 

https://www.wonena.com/collections/Screenshot 2024-05-13 at 12.10.57 PM.png

 

Building a Sustainable Marketplace from Scratch

PageFly-Victor
Shopify Partner
7865 1786 3135

Hi @Nicolaschina,

You can my screenshots

PageFlyVictor_0-1676522420064.png

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 %} &ndash; tagged "{{ current_tags | join: ', ' }}"{% endif -%}
      {%- if current_page != 1 %} &ndash; Page {{ current_page }}{% endif -%}
      {%- unless page_title contains shop.name %} &ndash; {{ 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

nicolaschina
Excursionist
16 0 4

@PageFly-Victor 

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

nicolaschina
Excursionist
16 0 4

@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?

Enayara
Visitor
2 0 0

Worked for me on www.enayara.com. Thanks!

gemcandygal
Visitor
3 0 0

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 %} &ndash; tagged "{{ current_tags | join: ', ' }}"{% endif -%}
{%- if current_page != 1 %} &ndash; Page {{ current_page }}{% endif -%}
{%- unless page_title contains shop.name %} &ndash; {{ 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 -%}

INA_MSWEB
Shopify Partner
1281 144 168

Hi @nicolaschina 


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:

  1. Log in to your Shopify admin panel and navigate to the "Products" section.

  2. Click on the "Collections" tab.

  3. Click on the collection that you want to edit.

  4. On the collection page, click on the "Edit website SEO" button located on the right-hand side of the page.

  5. In the "Search engine listing preview" section, you can edit the title and meta description.

  6. Edit the title and meta description to accurately reflect the content of the collection.

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

eagerdesigner
Shopify Partner
1 0 0

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

Eager ta meet ya!
Julius5
Excursionist
15 0 3

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.

StephensWorld
Shopify Partner
1401 174 389

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 }} &ndash; {{ 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