Support » Plugin: WooCommerce » Using the Lightbox with no product images

  • Is there a way to enable the Woocommerce embedded Lightbox so it works with non-product images as well. Adding another lightbox just conflicts with it and I prefer the Woo Lightbox.

    Thanks
    Bryan

Viewing 1 replies (of 1 total)
  • Please remove third party plugin of light box and use same light box class to all non product images. and add following code to run woocommerce light for complete site.

    add_action( ‘wp_enqueue_scripts’, ‘frontend_scripts_include_lightbox’ );
    function frontend_scripts_include_lightbox() {
    global $woocommerce;
    $suffix = defined( ‘SCRIPT_DEBUG’ ) && SCRIPT_DEBUG ? ” : ‘.min’;
    wp_enqueue_script( ‘fancybox’, $woocommerce->plugin_url() . ‘/assets/js/fancybox/fancybox’ . $suffix . ‘.js’, array( ‘jquery’ ), ‘1.6’, true );
    wp_enqueue_style( ‘woocommerce_fancybox_styles’, $woocommerce->plugin_url() . ‘/assets/css/fancybox.css’ );
    }

Viewing 1 replies (of 1 total)
  • The topic ‘Using the Lightbox with no product images’ is closed to new replies.