This is quite an annoying thing in WooCommerce when you have just a few products. Basically, if you only have 1 product in a given category, the notice “Showing the Single Result” will appear on top of the product in the category page. So, how do we remove it?

The annoying "Showing the single result" in WooCommerceThe annoying "Showing the single result" in WooCommerce
The annoying “Showing the single result” in WooCommerce

PHP Snippet 1: Remove “Showing the Single Result” @ WooCommerce Shop

In this case we want to remove “Showing the Single Result” but also the other notice that says “Showing x – x of x results”. Basically, the whole function. this can be achieved with PHP.

/**
 * @snippet       Remove "Showing the Single Result" - WooCommerce
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    Woo 4.0
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */
 
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );

PHP Snippet 2: Remove “Showing the Single Result” in Storefront Theme

/**
 * @snippet       Remove "Showing the Single Result" Storefront Theme - WooCommerce
 * @how-to        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @compatible    Woo 4.0
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */
 
add_action( 'init', 'bbloomer_delay_remove_result_count' );
 
function bbloomer_delay_remove_result_count() {
   remove_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 );
   remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
}
Share:

Leave a Reply