New Shopify Certification now available: Liquid Storefronts for Theme Developers

How to change title and meta description of collections (Dawn theme)

floweractually
Excursionist
27 0 4

Hi,

 

The title and meta description of collections page (www.floweractually.com/collections) of shopify is the same as my home page's. I think it's a default setting. It will be highly appreciated if I could get guidance on how to change it as duplicate title and meta description is not the best practice for SEO. 

Replies 2 (2)
TaskHusky
Shopify Expert
64 4 9

I didn't have time to test this. Within the theme.liquid you should be able to do something like:

{% if template contains 'collections' %}
<meta name="description" content="meta description for collections page">
{% else %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}

Zachary McClung, founder
Your Shopify Store Customized Your Way - 20,000 + Shopify Merchants Served
Clean Size Chart - Reduce Returns & Make More Money
floweractually
Excursionist
27 0 4

I used the following code and i could changed the title and meta description for collections but all the other collections' titles and collections changed to the same as the collections as well

 

 

<title>
{% if request .path == '/collections'%}
Discover Luxury Florist | Flower Actually Collections

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

{% endif %}


</title>

{% if request .path == '/collections'%}
<meta name="description" content="Explore exquisite blooms and bespoke arrangements that elevate every moment. Explore our collections today.">
{% else page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}