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

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 CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @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        Get CustomizeWoo.com FREE
 * @author        Rodolfo Melogli
 * @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 );
}

Where to add custom code?

You should place custom PHP in functions.php and custom CSS in style.css of your child theme: where to place WooCommerce customization?

This code still works, unless you report otherwise. To exclude conflicts, temporarily switch to the Storefront theme, disable all plugins except WooCommerce, and test the snippet again: WooCommerce troubleshooting 101

Related content

  • WooCommerce: Disable Variable Product Price Range $$$-$$$
    You may want to disable the WooCommerce variable product price range which usually looks like $100-$999 when variations have different prices (min $100 and max $999 in this case). With this snippet you will be able to hide the highest price, and add a “From: ” prefix in front of the minimum price. At the […]
  • WooCommerce: Hide Price & Add to Cart for Logged Out Users
    You may want to force users to login in order to see prices and add products to cart. That means you must hide add to cart buttons and prices on the Shop and Single Product pages when a user is logged out. All you need is pasting the following code in your functions.php (please note: […]
  • WooCommerce Visual Hook Guide: Archive / Shop / Cat Pages
    I’ve created a visual HTML hook guide for the WooCommerce Archive Page (which is the same page for the Shop, Category, Tag pages). This visual guide belongs to my “Visual Hook Guide Series“, that I’ve put together so that you can find WooCommerce hooks quickly and easily by seeing their actual locations (and you can […]
  • WooCommerce: Hide Prices on the Shop & Category Pages
    Interesting WooCommerce customization here. A client of mine asked me to hide/remove prices from the shop page and category pages as she wanted to drive more customers to the single product pages (i.e. increasing the click-through rate). As usual, a simple PHP snippet does the trick. I never recommend to use CSS to “hide” prices, […]
  • WooCommerce: How to Remove the “Default Sorting” Dropdown
    If the WooCommerce product sorting functionality (“Default Sorting” dropdown) is a waste of space or you don’t need that select box at all, you may want to remove it. No matter if you prefer custom code or a simple plugin – hiding the product sorting dropdown is a piece of cake. Enjoy!

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza. Follow @rmelogli

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

  1. 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?

    1. 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!

  2. Hello,
    I’m using the Flatsome theme, and this code is not working on this theme. please Help

    1. 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!

  3. 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

    1. 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

  4. Worked great today…thanks again for another excellent tip!

    1. Thank you!

  5. 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)

    1. 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!

  6. Works fine!

  7. perfect!

  8. 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 ?

    1. 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 ?

      1. Hey Michel, as I said privately, try using https://wordpress.org/plugins/simple-custom-css/ πŸ™‚

  9. 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

    1. Hey Marin thanks for your comment! You can do so with a simple line of CSS – hope this helps!

  10. 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

    1. 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 πŸ™‚

  11. 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

    1. 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

  12. 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

    1. Hello Nico, thanks for your feedback. Are you talking about removing the default sorting dropdown on the Shop page?

      1. 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 );

        1. Good stuff Nicolas, thanks for your feedback!

  13. Thank you for the swift reply Rodolfo! I am currently using the theme Storefront: https://www.woothemes.com/storefront/.

    1. Here you go – I also added this in the article above:

      // Removes showing results in Storefront theme
      remove_action( 'woocommerce_after_shop_loop', 'woocommerce_result_count', 20 );
      remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
      
      1. This worked perfectly. Thank you very much Rudolfo for the great help! It is very much appreciated! πŸ™‚

        1. Awesome, you’re welcome!

  14. 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!

    1. 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

  15. Cheers this is great!

    1. You’re welcome Martin!

  16. Thanks! πŸ™‚

Questions? Feedback? Customization? Leave your comment now!
_____

If you are writing code, please wrap it like so: [php]code_here[/php]. Failure to complying with this, as well as going off topic or not using the English language will result in comment disapproval. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining the Business Bloomer Club to get quick WooCommerce support. Thank you!

Your email address will not be published. Required fields are marked *