Site logo

Archived topic

WooCommerce GeneratePress Elementor Theme Builder image conflict

1 reply · Started by John on June 6, 2019

Viewing posts 1–2 of 2

I've been using GeneratePress Premium for years now and love it. Two years ago a added Elementor to my builds. I recently discovered a conflict when I built a new site using the Theme Builder feature from Elementor. I made templates for Product Archives and Single Product. The client wanted the GP 'zoom on hover' feature removed. I found a snippet on this forum to remove the zoom on hover but then discovered I got 2 lightboxes when I clicked on the main image. I tried deactivating woocommerce from the GP Premium tools to get rid of the extra lightbox but that didn't work. I found another snippet on this forum that would remove the lightbox. I now put them together and everything seems to work as intended.
Is this the best solution?

function remove_image_zoom_lbox_support() {
    remove_theme_support( 'wc-product-gallery-zoom' );
    remove_theme_support( 'wc-product-gallery-lightbox' );
}
add_action( 'wp', 'remove_image_zoom_lbox_support', 100 );

Hi there,

Yup the snippet looks good to me.

Those features are actually coming from WooCommerce. GP just adds them in for you which you can remove using the snippet you have.

Let me know if this makes sense :)

This archived topic is closed to new replies.