How to properly hide thumbnails using alt text in Envy theme?

How to properly hide thumbnails using alt text in Envy theme?

Waycap
Visitor
2 0 0

Hi,

 

we are currently using a Envy theme.

Trying to hide few thumbnails using alt text "hide"

the javascript to hide thumbnail with alt text "hide" is not working.

any suggestion?

 

this is what I've used in my theme.liquid

 

<script>
$( document ).ready(function() {
$(".product img[alt='hide']").parents('.product__media-item').hide();

});

</script>

 

I want to display only certain thumbnails.

Screenshot 2024-01-11 at 1.08.04 AM.png

 

Replies 2 (2)

Dan-From-Ryviu
Shopify Partner
11360 2226 2399

Please visit your Online store > Themes > edit code > open theme.liquid file, add this CSS code under <head> element, and check if it works

<style>
img[alt="hide"] { display: none !important; }
</style>

 

- Found this helpful? Hit "Like" and "Accept as Solution"!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify

Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

Waycap
Visitor
2 0 0

Hi Dan,

 

Thank you for the reply.

I tried it and it did work but not the way I wanted it to be.

I just wanted to hide it from the thumbnail but still want to show it when the product is clicked.

But right now the image doesn't display when clicked.

Will there be an alternate way to do this?

I only want to display detail photo in the thumbnail and show correct image color when product is selected.