• Resolved babakras

    (@babakras)


    Hello,

    I am using Storefront theme and I want to remove the ZOOM ON HOVER and LIGHTBOX feature on single product page.

    I did a bit of google and every code that I found was not working for me.

    anyone here can help me figure out how I can remove/disable zoom on hover and light box feature on single product page?

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @babakras,

    I used this on my test site with Storefront and it worked well. I added the snippet with the Code Snippets plugin.

    
    function ijab_disable_wc_lightbox_zoom() {
        remove_theme_support( 'wc-product-gallery-lightbox' );
    	remove_theme_support( 'wc-product-gallery-zoom' );
    }
    add_action( 'after_setup_theme', 'ijab_disable_wc_lightbox_zoom', 20 );
    

    snippet

    Let me know if you have any trouble.

    Cheers

    Thread Starter babakras

    (@babakras)

    Thank you @3sonsdevelopment

    I placed the code in function.php and it removed the zoom on hover and magnifying glass on top right corner of the main image which is exactly what I wanted but the lightbox is still there and when I click on the image a new link will open with the full size image.

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there,

    Glad to hear the code worked for removing the zoom on hover and magnifying glass!

    When you say “the lightbox is still there”, what are you referring to? The lightbox is the effect where it brings the image up on the same page for viewing in a box when you click on it, but you are also saying when you click on the image a new link opens with the full size image.

    Adding the code on my site with Storefront, I see that it disables the lightbox, but the image is still linked and brings up the full image when clicked.

    If you wanted to completely disable any clicking on the image, you could try some CSS like this:

    
    .woocommerce-product-gallery__image {
      pointer-events: none;
    }
    

    Please let me know how that goes, or if you have any questions!

    Thread Starter babakras

    (@babakras)

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Zoom on hover and Lightbox’ is closed to new replies.