input license here

Remove the Showing all x results feature in WooCommerce

display-all-x-results-in-woocommerce
In the previous article, I showed you how to remove product sorting feature in WooCommerce , right? Next to it is the words "Show all x results" or "Showing the single result" (depending on the case with "x" is a customizable number). If you are also looking for ways to remove this text to reduce discomfort because you think it is not really necessary, the following is a detailed guide.
woocommerce-show-all-x-results
Explore more:
  • Activate PayPal payment for VND on WooCommerce
  • Integrated payment QR code scanning for WooCommerce

Remove the Showing all x results feature in WooCommerce in general

Add the following code to the functions.php theme file  (or child theme) that you are using. You can also insert it through the Code Snippets plugin  .
remove_action ('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
view rawfunctions.php hosted with ❤ by GitHub
Save, clear the web cache (if you use the cache creation plugin) and check the results.

Remove the Showing all x results feature in the Storefront theme

If you use the Storefront theme (similar  to WP Basic's WP Shop system  ), replace the code above with the following code:
add_action ('init', 'wpcb_delay_remove_result_count');
function wpcb_delay_remove_result_count () {
remove_action ('woocommerce_after_shop_loop', 'woocommerce_result_count', 20);
remove_action ('woocommerce_before_shop_loop', 'woocommerce_result_count', 20);
}
view rawfunctions.php hosted with ❤ by GitHub
Save, clear the web cache (if you use the cache creation plugin) and check the results.
woocommerce-show-all-x-results-removed
WooCommerce's "Show all x results" feature has completely disappeared without a trace. It's simple, right? Good luck!
If you like this post, please subscribe to my blog to regularly update the latest and greatest posts via email. Thanks very much.  :)
Related Posts
Diệp Quân
Nguyen Manh Cuong is the author and founder of the vmwareplayerfree blog. With over 14 years of experience in Online Marketing, he now runs a number of successful websites, and occasionally shares his experience & knowledge on this blog.
SHARE

Related Posts

Subscribe to get free updates

Post a Comment

Sticky