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 |
---|---|
6 | |
5 | |
5 | |
5 | |
4 |
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...
ByYour online store speed can enhance your store’s discoverability, boost conversion rates a...
ByShopping is at our fingertips with mobile devices. Is your theme optimized to be user-frie...
By