Home » WooCommerce: Hide “Showing x-y of z results” @ Shop Page

WooCommerce: Hide “Showing x-y of z results” @ Shop Page

by adminkys

This is quite an annoying thing in WooCommerce when you have just a few products.

Besides, if you only have 1 product in a given category, the notice “Showing the Single Result” will appear on top of the category page.

So, how do we remove the whole “Showing 1–15 of 178 results” element from the Shop, Category, Tag and product loop? Here’s the fix. enjoy!

The annoying "Showing the single result" in WooCommerce
The annoying “Showing the single result” in WooCommerce. We’ll hide that completely with the snippet below, which hides the “Showing x–y of z results” string too.

PHP Snippet 1: Remove “Showing xyz results” @ 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 element.

/**
 * @snippet       Remove "Showing x results" - WooCommerce
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @compatible    WooCommerce 5
 * @donate $9     https://www.tutoraspire.com
 */
 
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );

PHP Snippet 2: Remove “Showing xyz results” in Storefront Theme

/**
 * @snippet       Remove "Showing x results" Storefront Theme - WooCommerce
 * @how-to        Get tutoraspire.com FREE
 * @author        Tutor Aspire
 * @compatible    WooCommerce 5
 * @donate $9     https://www.tutoraspire.com
 */
 
add_action( 'init', 'tutoraspire_delay_remove_result_count' );
 
function tutoraspire_delay_remove_result_count() {
   remove_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 );
   remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
}

You may also like