Rodrigo Moreno
Rodrigo Moreno

Reputation: 3

Remove WooCommerce product image from Wordpress

I’m trying to remove WooCommerce product image in my WP page (I'm using eStore template). I don’t need the product image to be shown, but when I remove the product image using the following PHP snippet, I get a blank space where the image is supposed to be, and it looks terrible:

remove_action( ‘woocommerce_product_thumbnails’, ‘woocommerce_show_product_thumbnails’, 20 );

I've tried to remove the image placeholder by inserting the following CSS snippet, but nothing happens:

.single-product .product .summary {
    width: 100% !important;
    float: none !important;
}

Could you please give me some guidance on this?

Note - this code come from: Remove WooCommerce image

Upvotes: 0

Views: 2309

Answers (2)

Kodaloid
Kodaloid

Reputation: 1326

Just make the image gallery area display as nothing and 100% should fill the area. I tried the following with your CSS on the default template and it worked for me:

.single-product .product .images { display:none; }

And here is an example page for those wondering:

https://demo.themegrill.com/estore/product/shoe-for-men/

Koda

Upvotes: 1

Zach Smith
Zach Smith

Reputation: 5674

the image variable/object is being shown on this template you are using. if you cannot figure that out, just do a super hacky:

divName img {
display:none;
}

and move on to learning how to manipulate the templates inside WooCommerce for better flexibility. You could even write a function to hide this image...

Upvotes: 0

Related Questions