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!
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 businessbloomer.com/woocommerce-customization
* @author Rodolfo Melogli, Business Bloomer
* @compatible WooCommerce 5
* @community https://businessbloomer.com/club/
*/
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 businessbloomer.com/woocommerce-customization
* @author Rodolfo Melogli, Business Bloomer
* @compatible WooCommerce 5
* @community https://businessbloomer.com/club/
*/
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 );
}
I am trying to show this counter on the page of Avada theme, but I can’t find how. Is there a way o show the product count on the page?
Hi Milen, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Hello,
I’m using the Flatsome theme, and this code is not working on this theme. please Help
Hello, thanks so much for your comment! Yes, this is definitely possible, but I’m afraid it’s custom work. If you’d like to get a quote, feel free to contact me here. Thanks a lot for your understanding!
Hi Rodolfo, I added the code and it disappeared from the top, but remained under the product, would you please know how to remove that one too?
thank you
Hi Peter, this snippet removes the default one (on the top). The bottom one is probably generated by your theme, so you need to remove your custom theme action
Worked great today…thanks again for another excellent tip!
Thank you!
I dont find the file “function.php”. In which directory can i find the file? (Windows 10 Search didnt work for me – dont find anything)
Hey Ron, it’s functions.php – if you need more guidance, please take a look at this video tutorial: https://businessbloomer.com/woocommerce-customization-hangout/. Hope this helps!
Works fine!
Great π
perfect!
π
Buongiorno Rodolfo,
I can access my WP Twenty Seventeen theme’s CSS by clicking Appearance > Editor but how can I have access to the CSS concerning my WooCommerce plugin ?
To follow up on my previous question, I went to Appearance > Editor, went to the bottom of the right column to Stylesheet (style CSS) and clicked on that.
It brought me to the top of the Edit Theme. I then inserted your text :
“/* CSS that Removes All Showing Results */
p.woocommerce-result-count {
display: none;
}
between the “*/” and the “/*” before the table of contents. It doesn’t work.
Where should I insert the text ?
Hey Michel, as I said privately, try using https://wordpress.org/plugins/simple-custom-css/ π
Hello,
do you have any idea how to remove the whole background line where the show results was shown?
I have managed to remove the text but there is still a background of the whole bar where this info was shown. I want to cut all that space and pull the articles up for that space.
Hopefully you have understood me.
Thnx
Hey Marin thanks for your comment! You can do so with a simple line of CSS – hope this helps!
Hi,
I removed it perfectly and also the sort by… horrible useless idea to implement, without asking the user.
Another question. Do you know how to replace it with a search option in stead ? Preferably one that updates whats left while the user is typing.
Take care, kind regards Peter
Nice! Thanks for your feedback Peter π
For the search, I actually published this a few days ago; just change the hook/position and you should be able to figure that out: https://businessbloomer.com/woocommerce-add-custom-search-bar-headerfooter/
Let me know π
I’ve added the code to the functions.php file:
// Removes showing results
remove_action (‘woocommerce_before_shop_loop’, ‘woocommerce_result_count’, 20);
>> but without success
hope you help me
thank you much
Hey! Thanks for your comment π It could be that your theme or another plugin are already overriding that function. Do a file search for “woocommerce_resulot_count” string and see if anything is affecting that call π Hope this helps
Dear Rodolfo,
When I use the CSS it still appears the scrolling menu in the shop page. Is there any CSS to quit it too?
Thank you
Hello Nico, thanks for your feedback. Are you talking about removing the default sorting dropdown on the Shop page?
Hello Rodolfo, yes, actually it was that. It didn’t work for me so I managed it with this change:
From:
add_action( ‘ux_woocommerce_navigate_products’, ‘woocommerce_result_count’, 20 );
add_action( ‘ux_woocommerce_navigate_products’, ‘woocommerce_catalog_ordering’, 30 );
To
remove_action( ‘ux_woocommerce_navigate_products’, ‘woocommerce_result_count’, 20 );
remove_action( ‘ux_woocommerce_navigate_products’, ‘woocommerce_catalog_ordering’, 30 );
Good stuff Nicolas, thanks for your feedback!
Thank you for the swift reply Rodolfo! I am currently using the theme Storefront: https://www.woothemes.com/storefront/.
Here you go – I also added this in the article above:
This worked perfectly. Thank you very much Rudolfo for the great help! It is very much appreciated! π
Awesome, you’re welcome!
Hi, and thank you for this :).
However the βShowing the Single Resultβ text appeared on both top of the page and on the bottom, and this trick only removed it on top of the page. Any advice on how to remove the same text on the bottom aswell?
Thank you!
Hey Marty thanks for the feedback. Probably your theme adds one more element to the bottom. What theme are you using, or can you tell me the address of your website please? Thank you
Cheers this is great!
You’re welcome Martin!
Thanks! π
Welcome π