How can I add a clickable- function to this image?

Solved
Highlighted
Tourist
7 0 0

Hey there! :)

 

How can I add a linking function to this picture?

https://gyazo.com/7af7cefeb093f53a749ab7c206ec1c40

 

And this is the html thing with google chrome

https://gyazo.com/b6a1439c743a02f0de612c1e7da84b65

 

I want to link this picture directly to the product, but I can't find this function at shopify.

I'm using venture theme by the way.

 

Thank you guys! :)

 

0 Likes
Highlighted
Shopify Expert
871 72 204

This is an accepted solution.

If you want the whole image clickable you can wrap it in an anchor tag, for example:

<a href="https://PUT_LINK_HERE">
<img src="THIS_IS_THE_IMAGE">
</a>

You can find the code in your theme editor. From the screenshot you sent, I'm guessing this might be in a Snippet called image-content.liquid or something similar.

 

If you change a template file like that the link would apply to all instances of that section. If that's the only instance that's fine, but if you have multiple you're probably better off adding a custom link field to this section so can add a link from the Customize Theme section.

 

*Assuming there's no link field in the Customize Theme area, if there is, then you can just paste the link :)

Founder of Speed Boostr (Shopify optimization and dev agency).
Creator of Theme Scientist (A/B testing app).
Creator of Order Automator (app that auto tags + fulfills orders, send emails).
Creator of Tip Jar (add a tip button to your store).
Creator of Shopify Analyzer (first performance analysis tool specifically for Shopify sites).
My team also builds custom apps and automated solutions.
Enjoy the adventure!
1 Like
Highlighted
New Member
15 0 0

@JoesIdeas wrote:

If you want the whole image clickable you can wrap it in an anchor tag, for example:

<a href="https://PUT_LINK_HERE">
<img src="THIS_IS_THE_IMAGE">
</a>

You can find the code in your theme editor. From the screenshot you sent, I'm guessing this might be in a Snippet called image-content.liquid or something similar.

 

If you change a template file like that the link would apply to all instances of that section. If that's the only instance that's fine, but if you have multiple you're probably better off adding a custom link field to this section so can add a link from the Customize Theme section.

 

*Assuming there's no link field in the Customize Theme area, if there is, then you can just paste the link


Hi ! Thanks for the solution. Do you know how to use this function but instead, using another picture for mobile and Desktop ?

 

Kind regards,

0 Likes