SEO, AdWords, affiliates, advertising, and promotions
Hi Community,
I'm baffled. I've got a site using the Empire theme for which I am trying to make the URL always be the canonical. For example, I want https://www.purelyintegrative.com/collections/omega-3s/products/arctic-orange to always render as https://www.purelyintegrative.com/products/arctic-orange. I used this theme.liquid change successfully on at least one other site but it's not working this time:
replaced:
<link rel="canonical" href="{{ canonical_url }}" />
with
{% if template contains 'collection' %}
<link rel="canonical" href="{{ shop.url }}{{ collection.url }}" />
{% else %}
<link rel="canonical" href="{{ canonical_url }}" />
{% endif %}
I then searched the help community and found a suggestion a make this change to product.liquid:
Replace
"{{ product.url | within: collection }}"
with:
{{ product.url }}
That didn't work either. What I am doing wrong?
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024