Created
October 16, 2024 05:41
-
-
Save pixelstorm/26cc31261bc9ce6ff666d40177b06e41 to your computer and use it in GitHub Desktop.
shopify liquid canonical conditional statement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if template contains 'collection' and current_tags %} | |
<meta name="robots" content="noindex" /> | |
<link rel="canonical" href="{{ shop.url }}{{ collection.url }}" /> | |
{% else %} | |
<link rel="canonical" href="{{ canonical_url }}" /> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
taken as a backup from the orginal theme.liquid file