Adding a link to clickthrough image

byneilvernon
Tourist
21 0 3

Hi everyone,

 

I am having adding a link to my homepage image. I'd like it to be able to click through to my 'Shop All' page. This is the image that I am trying to link:

Screen Shot 2023-11-20 at 6.48.48 pm.png

 

Site theme is Pipeline and my url is: https://768950-4.myshopify.com/

Any form of help is greatly appreciated!

Reply 1 (1)

BSS-Commerce
Shopify Expert
3465 459 515

Hi @byneilvernon ,

To do this, find the theme.liquid file and add the following code:

<script>
 var imageElement = document.querySelector(".hero__content__wrapper.align--middle-center");

 imageElement.addEventListener('click', () => {

  window.location.href = "https://768950-4.myshopify.com/collections/all";

 })
</script>

Hope it helps @byneilvernon 

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.

For B2B solutions and custom pricing, check out B2B Solution & Custom Pricing |
For adding product labels/badges, visit Product Labels by BSS

BSS Commerce - Shopify Apps & Store Development Service Provider

Hire a Shopify expert | Shopify Plus Store Development