I m trying to make a <a>
tag in product page which redirects to other pages, I want to give this url using metafield any idea on how to archive this?
I m trying to make a <a>
tag in product page which redirects to other pages, I want to give this url using metafield any idea on how to archive this?
2
Answers
Does this work?
<a href ="[LINK]" ></a>
Copy the link you need, and put it instead of [LINK]
The answer is pretty simple. Assuming you have your URL in a metafield, just render the value into the href.
Since you did not specify which resource you speak of, I left it as someresource. If it is pages, the use pages. mylinks is your namespace where you stored your metafield key values. The key is url, and the value is whatever you stored there, a link to another page maybe.
Shopify has a ton of documentation on using Metafields, you can refer to those for more details.