Shopify themes, liquid, logos, and UX
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!
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.
Thanks for the reply, where do I put this code?
Add this where your image code is
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"
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 }}
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>
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
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?
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024