Making Image on Homepage Clickable (Attaching a Link to it)

Solved
mhalfya
Tourist
37 0 0

Hi everyone,

 

I'm looking to make the main image on my homepage (image with text overlay) clickable so that I can attach a link to it and it will take customers to a collection page from the homepage.

 

I'm currently using the Debut theme.

 

Any suggestions would be greatly appreciated!

 

Thanks!

Replies 25 (25)
CloudE5
New Member
4 0 0

Finally managed. In case someone finds this and is struggling with the above solutions:

I wanted to link images in my Debut theme in the section called text columns with images.

I had to add the code suggestions in feature-columns.liquid

After

{
"type": "text",
"id": "button_label",
"label": {
"en": "Button label",
"de": "Button-Name",
"fr": "Texte du bouton",
"it": "Etichetta pulsante",
"ja": "ボタンラベル",
"es": "Etiqueta de botón",
"pt-BR": "Etiqueta do botão"
}
},

 

I added:

{
"type": "url",
"id": "image_link",
"label": "Image link"
},

 

then,after 

<div style="padding-top:{{ 1 | divided_by: block.settings.image.aspect_ratio | times: 100}}%;">

I added 

<a href= "{{ block.settings.image_link }}"> 

 

 

seansean
New Member
1 0 0

Hey there, did you manage to find a solution to this as I am having the same issue.

Fern88
Tourist
9 0 1

I was also having the issue with the image being really big when adding the href, so I added it to the div above it and for me this worked.  The Image now is a link and it holds the correct size.  I attached a screenshot of where I added the a href...

2021-05-03 (5).png

twosparrows2
New Member
3 0 0

HELP! I have completely messed up my code. I deleted and replaced the wrong code.  Can someone post the whole code, beginning to end for this section that includes the code to make the image clickable?  I'm on the hero section as well as I have an image with text overlay I'm trying to make clickable in my Debut theme in my Shopify home page. I'm freaking out!  

 

Also, does any one have code that would make custom content image section clickable?  

 

Thank you, thank you!

 

Nancy 

olimon
New Member
2 0 0

Yes I need help with this too.

Purekalon
Excursionist
40 0 8

Can I do this on Boundless theme ?