Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have a store using the Taste theme and would like to add a meta description to the collections/all page. How can I do that?
This can't be changed via the Shopify backend, however with a little custom code you can add your own title and description.
In Theme.liquid you will find the following code near the top of the page
<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 %}
Please replace it with the new code below
{% if canonical_url == 'https://store-name.myshopify.com/collections' %}
<title>Custom Title Here</title>
<meta name="description" content="Custom 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 %}
You will need to add your collection page URL in place of https://your-store-name.myshopify.com/collections and then change the Custom Title Here and Custom Description Here text to whatever you need.
Hope this helps
Simon
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024