Disable URL Redirection When Clicking On Product Image on home page

Topic summary

A user wants to disable URL redirection when clicking product images on their Shopify store’s homepage (using Prestige theme), preferring images to be non-clickable instead of linking to product pages.

Attempted Solutions:

  • GemPages suggested adding JavaScript code to theme.liquid before the </body> tag, targeting the index template
  • This solution did not resolve the issue

Working Solution:

  • BSS-Commerce provided code to add at the end of a JS file (typically theme.js) in the assets folder:
setTimeout(() => {
  document.querySelector(".FeaturedProduct .FeaturedProduct__Gallery").style.pointerEvents = "none"
}, 1000)
  • This successfully disabled the clickable functionality

Follow-up:

  • Another user (Tele_Lam) encountered a similar issue with the Testament theme but couldn’t locate the JS file mentioned in the solution, requesting additional guidance
Summarized with AI on November 5. AI used: claude-sonnet-4-5-20250929.

Hi,

I am using the Prestige theme and would like to disable the URL redirection when clicking on the product image that’s on my home page. Rather than redirecting to the product page, I’d like for the product image to do nothing at all when clicking on it, i.e. I just want to remain on the same page.

Thanks!

Hello @ggbears2022

You can follow these steps:

  1. Go to Online Store->Theme->Edit code

  1. Open your theme.liquid file, paste the below code before

{%  if template contains 'index' %}
    
    
    {%  endif %}

I hope the above is useful to you.

Kind & Best regards,
GemPages Support Team

Hi @GemPages , thanks for the response. Unfortunately, the same issue is still persisting after adding the code. I’d appreciate any other potential solutions that you may have. Thanks!

Hello @ggbears2022 ,

Please share your store URL and password.
So that I will check and let you know the exact solution here.

Hi @f_malik , will this preview of our site suffice? https://k6pg6achah3p6wxi-68791861539.shopifypreview.com

thank you!

Hi @ggbears2022

Please follow these steps:

Go to Online Store > Theme > Edit Code, and find the assets folder. Then, please add the following code at the end of any JS file until the image link doesn’t work. Usually, that file is called theme.js:

setTimeout(() => {
  document.querySelector(".FeaturedProduct .FeaturedProduct__Gallery").style.pointerEvents = "none"
}, 1000)

I hope that it will work for you.

1 Like

EDIT:

Hi @BSS-Commerce , this worked!! Thanks so much for your help

1 Like

Hi, @BSS-Commerce I encounter the same problem that the it redirects to the home page when I click on the product page. How can I stop the redirect? I’m using Testament theme and couldn’t find the code in the JS file you mentioned above. Can you please help?