Help needed with adding link to Image banner

Help needed with adding link to Image banner

SoarMusic
New Member
5 0 0

Hey there,

 

I'm trying to add a link to an Image banner on our store's homepage. I tried following a couple of guides but couldn't make it work.

 

Here's a link to our store: https://portal.soarmusicgroup.com
I'm trying to add a link to the image featuring a testimonial (above the 'Why artists trust us with their releases' section)

 

Thanks in advance for any pointers on this!

Replies 5 (5)

niraj_patel
Shopify Partner
2378 514 511

Hello @SoarMusic 
Here is example
with the help of this you can make your image clickable

<a href="https://yourlink.com"> <img src="{{ 'testimonial-image.jpg' | asset_url }}" alt="Testimonial"> </a>


Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com
SoarMusic
New Member
5 0 0

Thanks for the reply, where do I put this code?

niraj_patel
Shopify Partner
2378 514 511

Add this where your image code is

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

Sweans
Shopify Partner
401 79 121

Hello @SoarMusic ,

To add a link to the image banner on your store's homepage, please follow these steps:

Step 1: Go to the "Edit Code" section in Shopify Backend → Sales Channel → Online Store → Click on the three dots near the active theme customize button → Select "Edit Code"

Sweans_0-1721736599518.png

 

Step 2: Use the search bar to locate the 'image-with-text.liquid' file.

Step 3: In the 'image-with-text.liquid' file, find the following code:

{{ section.settings.image | image_url: width: 1500 | image_tag: sizes: sizes, widths: widths, fetchpriority: fetch_priority }}

 

Sweans_1-1721736626273.png

 

Step 4: Replace the code with the following:

<a href='#Add_your_URL_here'>
{{ section.settings.image | image_url: width: 1500 | image_tag: sizes: sizes, widths: widths, fetchpriority: fetch_priority }}
</a>



Sweans_2-1721736670814.png

 


Step 5: Save your changes and check the results.

If you need further assistance, feel free to reach out!
I hope this helps! If it does, please like it and mark it as a solution!

Regards,
Sweans

- Was my reply helpful? Please Like and Accept the Solution or let me know by Buying me coffee!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me at info@sweans.com regarding any help.
- To know more about me check out www.sweans.com

SoarMusic
New Member
5 0 0

Thanks for the clarification.

 

I am actually trying to edit the 'Image banner' block, not the 'Image with text' block. I tried using this code in the image-banner.liquid file, but it didn't work correctly. On desktop view, the image disappeared, and on mobile view, the link worked, but the desktop version of the image was shown (there is a mobile-only version of the image which should be shown).

 

Any ideas what might be causing this?