I recently posted for help with the lightbox after adding code to remove the featured image from the single product page. The topic was closed before I had a chance to reply.
This is the original post:
I wanted to remove the featured image from showing up on the single product page.
I managed this by adding the code:
remove_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_images’, 20 );
add_action( ‘woocommerce_before_single_product_summary’, ‘woocommerce_show_product_thumbnails’, 20 );
to the functions.php file in the child theme.
Now, I have an issue when clicking the gallery image. I’m not sure if this is called the lightbox or something different. The image is bigger which is not a big deal. The exit “X” is gone when clicking which makes it difficult to return to the product page. I have to use the back button on my browser. (Also, my favicon does not show up on this page.)
I tried to disable the click using this code:
remove_theme_support( ‘wc-product-gallery-lightbox’ );
It did not disable the click.
I need to fix this one way or the other. Either by disabling the ability to click the image or by removing the feature image without it removing the exit button from the clicked image.
I did try to build the page with the product builder. Not only did disabling the lightbox feature not work, but it disabled the code to remove the featured image from the page. Any suggestions?
Today, I’ve ran into more problems. I wanted to try the dark theme but it did not work. Neither does changing the background color.