Remove Default Sort in WooCommerce and ‘Showing All Results’ Notice

In an e-commerce environment using WooCommerce when there is only a few products to sell, it is cleaner and more intuitive to rid the space of some clutter – such as the ‘Default Sorting‘ options dropdown and the display notice ‘Showing all x results‘.

 
<?php  // <- dont add in the opening tag

//remove display notice - Showing all x results
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
//remove default sorting drop-down from WooCommerce
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );


Add this code in your themes functions.php file and you will have a cleaner simpler look.

 
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Run OPTIMIZE TABLE to defragment tables for better performance

For this suggestion:Run OPTIMIZE TABLE to defragment tables for better performanceRun this...

How to clear Error Log of a cPanel Account.

User the below code to clear Error Log:Replace User with Username:Code:for i in `find...

What is php.ini ?

The php.ini file and changing PHP Settings The php.ini file is a special file for PHP and...

How to fix ini_set() has been disabled for security reasons

1. Create php.ini file inside your public_html folder, OR the folder in which you have...

How to fix Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone:

1: Create .htaccess file inside your public_html folder, OR the folder in which you have...