Please help! The product thumbnail image doesn't change/switch the main image when clicked

I’ve tried searching the forums and haven’t found a solution yet. But there’s something wrong with my product pages.

When a customer is viewing a product and they go to click on the additional images, nothing happens. The main image is the only one customers are able to see at this time. The other images cannot be properly viewed. This is causing customers to leave the site because they can’t see the images of my products from different angles, etc.

This is an issue happening on all of my products.

Here is an example product:

https://morgancerese.com/collections/original-artwork/products/gears-of-time-acrylic-painting-6x8-inches

I haven’t made any changes to the code in months so I’m not sure why this is happening.

I’m using the Minimal theme. Is anyone able to help me?

Update: I talked to Shopify support and a piece of coding I added back in February was causing this issue.

I added this code to my theme.liquid file so my wholesale products wouldnt be indexed by search engines for just anyone to search and see.

{% if handle contains ‘wholesale-order-form’ %}> > {% endif %}> > {% if product.handle contains ‘wholesale’ %}> > {% endif %}

But why would this code cause image thumbnails to break?

Anyways, I moved towards the end of my theme.liquid file and everything appears to be working fine now.