frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Having issues with WooCommerce Lighbox

edited November 11 in WordPress

I have a shop website with WooCommerce 3.5 and on product detail page using default WooCommerce templates, there is an issue with lightbox about clicking on the main image or gallery images. The site redirects me to a page with the image link instead of showing the lightbox.

Comments

  • You just need to add these lines in your function.php file and your lightbox (photoswipe) will work absolutely fine.

    if(class_exists('WooCommerce')){
        add_theme_support( 'wc-product-gallery-zoom' );
        add_theme_support( 'wc-product-gallery-lightbox' );
        add_theme_support( 'wc-product-gallery-slider' );
    }
    

    Hope this helps

  • I found the solution. In latest version woocommerce-3.0.3, lightbox is replaced with photosswipe. Photoswipe is disabled in my theme. It works only if the theme add support like add_theme_support('wc-product-gallery-lightbox') then it works like a charm

  • The problem is not only the missing add_theme_support('wc-product-gallery-lightbox')

    If the DOM structure is not the same as the updated files: product-thumbnail.php and product-image.php - then the add_theme_support function won't help you.

    Copy these files from WooCommerce plugin to your theme, and it should work.

Sign In or Register to comment.

The Forum Hub

| make vanilla clean and light
@ 2018 The Forum Hub, All rights reserved.
Powered by VanillaForums, Designed by ThemeSteam

Contact us

admin@theforumhub.com
support@theforumhub.com
(800) 3032120

Get In Touch