WooCommerce: Remove “Showing the Single Result”

This is quite an annoying thing in WooCommerce. 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 WooCommerce
The annoying “Showing the single result” in WooCommerce

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        Watch tutorial @ https://businessbloomer.com/?p=19055
 * @source        https://businessbloomer.com/?p=369
 * @author        Rodolfo Melogli
 * @compatible    Woo 3.5.3
 * @donate $9     https://businessbloomer.com/bloomer-armada/
 */

remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );

Remove “Showing the Single Result” in Storefront Theme


/**
 * @snippet       Remove "Showing the Single Result" Storefront Theme - WooCommerce
 * @how-to        Watch tutorial @ https://businessbloomer.com/?p=19055
 * @source        https://businessbloomer.com/?p=369
 * @author        Rodolfo Melogli
 * @compatible    Woo 3.5.3
 * @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 );
}

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (before "?>" if you have it). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7+.

If you think this code saved you time & money, please join other Business Bloomer supporters and avail of 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce Customization?

Check out these free video tutorials!

  • how-to-edit-woocommerce-with-php-snippets
  • woocommerce-hooks-add_action-list-visual
  • woocommerce-customize-single-product-page-PHP

Rodolfo Melogli

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as a 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.

33 thoughts on “WooCommerce: Remove “Showing the Single Result”

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

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

    1. Thank you!

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

  4. Works fine!

  5. perfect!

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

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

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

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

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

  11. Thank you for the swift reply Rodolfo! I am currently using the theme Storefront: http://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!

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

  13. Cheers this is great!

    1. You’re welcome Martin!

  14. Thanks! πŸ™‚

Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between: [php]code_here[/php]. Failure to complying with this (as well as going off topic) will result in comment deletion. You should expect a reply in about a week - this is a popular blog but I need to get paid work done first. Please consider joining #BloomerArmada to ask me 1-to-1 WooCommerce questions. Thank you :)

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.