Stop sliding effect on product gallery
-
Hi there, I wanted to keep the functionality of the product slider, yet I can’t for the life of me figure out how to turn off the sliding effect. I’d rather just have it swap the images over.
Like this example here? https://www.southlondongallery.org/shop/john-armleder-about-nothing-2007-and-nothing-about-2007/
Is it possible to have the slider doing this? I’ve tried some functions in my functions.php I’ve found from Google searching but they have not worked.
Thanks
Aaron
-
Hi there Aaron,
I took a look at your example product, and it appears you have already figured this out — clicking through the images, they just swap out instead of sliding:
Link to image: https://d.pr/i/M1J3gdSo, great job sorting that out!
I’m going to mark this thread as resolved. If you have any further questions, please start a new thread.
Have a wonderful day!
Hi there this has not been resolved at all. The sliding effect is still in place. It just the images are using placeholder dark images so you do not notice the sliding effect when you switch between them.
please can you tell me how to disable the effect?
Thanks
Hi there,
I realize now that the link you included is your “example” of what you want — not the link to your site, correct? That is why I did not see any sliding effect when I checked your link.
It does not look like you’ve included a link to your own site, so I can’t see what you are referring to for the “placeholder dark images”.With our default Storefront theme, I tried adding this CSS to remove the transition duration — instead of sliding the images, it should just instantly change over between them:
.woocommerce-product-gallery__wrapper { transition-duration:0s !important; }Alternatively, this PHP snippet would just completely disable the image gallery slider functionality:
add_action( 'wp', 'my_disable_wc_slider', 50 ); function my_disable_wc_slider() { remove_theme_support( 'wc-product-gallery-slider' ); }I hope that helps.
Thank you four help. This worked first time.
The topic ‘Stop sliding effect on product gallery’ is closed to new replies.