Skip to content

Snippet: Remove WooCommerce Entry Thumbnails

You may want to consider instead creating a custom card for your products that simply doesn't include a thumbnail.

If for some reason you wish to remove the WooCommerce thumbnails from the entries (shop/archive/related) you can do so using the code below.

/**
 * Disable the theme's custom woocommerce product entry thumbnail display.
 *
 * @link https://total.wpexplorer.com/docs/snippets/remove-woo-entry-thumbnails/
 */
add_filter( 'wpex_woocommerce_template_loop_product_thumbnail', '__return_false' );

/**
 * Removes the WooCommerce product entry images.
 *
 * @link https://total.wpexplorer.com/docs/snippets/remove-woo-entry-thumbnails/
 */
add_action( 'init', function() {

	// Remove thumbnail
	remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );

	// The sale tag because it's usually positioned over the image.
	remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );

} );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top