Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using wooCommerce. When i set the featured image for a woocommerce product, it shows up as the first/main image in the gallery on the product details page. I need to remove the featured image from the gallery only. How to do this?

share|improve this question
Please edit your question to include the relevant code, in context, that is used to output the gallery on the product page. –  Chip Bennett Jan 7 at 16:32
add comment

2 Answers

Found an answer here: http://stackoverflow.com/questions/16922849/woocommerce-hide-featured-image-on-product-detail-page

Haven't tested it, but it might work out for you.

share|improve this answer
I think the example will remove the featured image from the product detail page too. I just wanted to remove it from the gallery under the featured image only. –  lifeline Jul 19 '13 at 11:46
Hmm, this person was trying to do what you are: stackoverflow.com/questions/17278291/… –  mtuttle Jul 19 '13 at 11:55
Whats the gallery? Is it a template or page included in or generated by WooCommerce? Or is it something you added? There's at least 8 templates for products included. –  Brad Dalton Jan 7 at 19:51
add comment

You could remove both and then add the thumbnail images back.

Paste this code at the end of your child themes functions file.

remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );

add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_thumbnails', 20 );

You would also want to change the size of the thumbnail images




share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.