SEO, AdWords, affiliates, advertising, and promotions
Hi,
I've found a few posts on canonical tweaks, but nothing that will let me do this.
I want to set all my products canonicals, to point to the collection that the product itself is assigned to (assuming only one assignment exists),
Can anyone show me how to do this please?
Many thanks.
Open the following file theme.liquid in the folder Layout
Find the following text:
<link rel="canonical" href="{{ canonical_url }}" />
And replace it with:
{% if template contains 'product' %}
<link rel="canonical" href="{{ product.url }}" />
{% else%}
<link rel="canonical" href="{{ canonical_url }}" />
{% endif %}
This hasn't been tested. Update other links on your website to point to the collections version of the URL.
User | RANK |
---|---|
9 | |
8 | |
3 | |
3 | |
3 |
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023