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 have a problem with adding images to the content/product description and stopping them from showing in the gallery below the featured image. They are downloadable products & some of the images are just to make the product descriptions look nicer, but I certainly don't want them in a gallery.

Is there anyway I can add images to the product description without them showing in the gallery?

share|improve this question
add comment

1 Answer

This is really easy to do if you look into the WooCommerce hooks. Add this line of code to the bottom of your functions.php file.

remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );

The number at the end of the function (20 in this case) may change if you have a custom theme that already reprioritized the woocommerce_show_product_thumbnails function.

A permanent link to the gist: https://gist.github.com/BFTrick/6273288

share|improve this answer
add comment

Your Answer

 
discard

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.