609 votes
0 answers
liquid - How to no-index specific pages on shopify? Don't want to use "contains" example for shopify, can I just type "="? And what denotes as the handle?
Solution:
For the "/collections" page, you may use the request (https://shopify.dev/api/liquid/objects/request) object like this:
{% if request.page_type == 'list-collections' %}
<meta name="robots" content="noindex">
{% endif %}
For the collection page automatically created, the handle will always be "all" (/collections/all), and you may use a strict condition:
{% if handle == 'all' %}
<meta name="robots" content="noindex">
{% endif %}
Undefined asked
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.