WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

closed as off-topic by ialocin, Rarst May 18 '14 at 10:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the 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 '14 at 16:32

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 '14 at 19:51

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

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