Using metafield to customize Shopify store
This liquid is used to canonicalize any product page to another product page for SEO purposes.
Alternatively, the product page can be canonicalized to any other page of the site, such as a collections page.
Simply copy and paste the code to the theme liquid file.
Changes might be necessary depending on the theme and its versions.
This code is written for the Symmetry theme from cleanthemes.co.uk.
Once the code is deployed into the theme liquid, individual product pages can be updated with the metafield.
A metafield editor is required to make any edits, ShopifyFD is recommended.
Enter "seo" into the "Namespace" field; enter "unique_url" into the key field;
For the value field, enter the destination url of the page for canonicalization.
The click the "Save" button.
Go to the product page and check the source code to make sure the page has been properly canonicalized.
The code has been developed with help from Jason at freakdesign.com.au.