If you use WordPress and WooCommerce to sell products on your website, you may well want to remove the default sorting and/or “Showing All X Results” text from your shop and category pages – particularly if you don’t have more than a handful of products!
The code snippets below will allow you to do just that.
These snippets should be added to your theme‘s Functions.php file, and you should try to use child themes so that, when you update the theme’s code (you do update, right?!) you won’t simply over-write all your changes and revert back to the old situation.
Code to Remove Default Sorting Option from WooCommerce Shop / Category Pages
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
Code to Remove “Showing All … Results” Text from WooCommerce Product, Catalog, and Shop Pages
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
Ask a question in the comments section, below, for public help, or, if you have a WordPress / WooCommerce / e-commerce project you’d like professional assistance with, feel free to contact us using the available telephone and email options found here.
10 thoughts on “WooCommerce Tutorial: Remove “Showing All … Results” and “Default Sorting” from Shop / Category Pages”
So, remember, these snippets should be added to Functions.php in your THEME. Happy coding!
And what if i just want to rename it? How can i do it?
Its worth looking at the Localization plugin for this with WooCommerce:
Its normally used for translations, but its GREAT for renaming parts of the website.
may I ask you in which position in the functions.php I have to add the snippets?
Sorry I missed this question – you should add it anywhere, but, for safety, at the bottom of Functions.php. If you are using a child theme (recommended) this may be empty.
Thanks you, just what i needed
So this code can be placed in any of the e-commerce wordpress pages ?
Great tip! It worked. However, i cannot remove the ‘All Products’ title at the top of my woocommerce ‘Shop’ page. Can you help? Thanks in advance!
That may be a template/theme issue.
If you want us to take a look, get in touch!
I dont want to remove, only need to show under the products and over pagination, is that possible?