Conflict with hiding featured image
-
Hi!
I’m using your plugin to add variations images to the gallery and it works fine.
On the other hand I’m trying to hide featured image on product page as I just want to show featured image on archive page.
I’ve add this code that works fine for hiding featured image on product page:add_filter('woocommerce_single_product_image_thumbnail_html', 'remove_featured_image', 10, 2); function remove_featured_image($html, $attachment_id ) { global $post, $product; $featured_image = get_post_thumbnail_id( $post->ID ); if ( $attachment_id == $featured_image ) $html = ''; return $html; }
But the problem is that when this plugin is activated code doesn′t work and featured image is showing again.
Please, can you give a solution to hide featured image with no conflicts with your plugin?
thanks,
Ana Pascual
- The topic ‘Conflict with hiding featured image’ is closed to new replies.