There is no easy way to modify the metadata of /collections
and /collections/all
pages in the Shopify admin or through the Shopify API.
However, we’ve prepared a code snippet that you can use in your theme.liquid
file to manually set the metadata on these two pages.
Please follow these steps:
Before making any code changes, please create a backup of your theme.
Go to the theme code editor and open the
theme.liquid
file.Locate the
<title
and<meta name="description"
tags in the<head>
section of your theme.Replace both tags with the code below and add the required text to the meta title and meta description tags.
{% if request.path == '/collections' %}
<title>/collections meta title</title>
<meta name="description" content="/collections meta description">
{% elsif request.path == '/collections/all' %}
<title>/collections/all meta title</title>
<meta name="description" content="/collections/all meta description">
{% else %}
<title>{{ page_title }}</title>
{% if page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}
{% endif %}
5. Make sure to save your changes and test both URLs to ensure the changes have been applied.
If you have any difficulties locating the meta tags in your theme or applying the provided code, please reach out to our customer support, and we will assist you.