Hi,
I have searched a lot for a solution to add a noindex by editing theme.liquid file to add “noindex” to paginated pages of collections, but don’t think there is a solution and if there is then those pages are archieved.
Example: https://www.example.com/collections/example-category?page=4
I’m specifically looking to noindex all collection that contains '?page=" but unable to.
This is what I’m currently at, but not working
{% if template contains ‘collection’ and collection.handle contains ‘?page=’ %}
{% endif %}
If I try the below, it adds noindex to all the collections as well, which I do not want.
{% if template contains ‘collection’ and current_tags %}
{% endif %}
or
{% if template contains ‘collection’ and current.filters != blank %}
{% endif %}
Please only reply if you can provide a solution to the above. Thanking heaps in advance.
P.S: I’m not looking for a canonical solution, that thing is already working. Thanksssss