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.

This PHP solution is simply cleaner than CSS – and no matter if you code or not, you just need to copy/paste my snippet in your theme’s functions.php.

WooCommerce: Hide “Default Sorting” Dropdown

PHP Snippet 1: Remove “Default Sorting” Dropdown @ WooCommerce Shop & Archive Pages

/**
* @snippet       Remove "Default Sorting" Dropdown @ WooCommerce Shop & Archive Pages
* @how-to        Get CustomizeWoo.com FREE
* @author        Rodolfo Melogli
* @compatible    Woo 3.8
* @donate $9     https://businessbloomer.com/bloomer-armada/
*/
 
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );

PHP Snippet 2: Remove “Default Sorting” Dropdown in StoreFront theme

/**
* @snippet       Remove "Default Sorting" Dropdown @ StoreFront Shop & Archive Pages
* @how-to        Get CustomizeWoo.com FREE
* @author        Rodolfo Melogli
* @compatible    Woo 3.8
* @donate $9     https://businessbloomer.com/bloomer-armada/
*/
 
add_action( 'init', 'bbloomer_remove_default_sorting_storefront' );
 
function bbloomer_remove_default_sorting_storefront() {
   remove_action( 'woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 10 );
   remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 );
}

Is There a Plugin For That?

If you’d love to code but don’t feel 100% confident with PHP, I decided to look for reliable plugins that achieve the same result. As usual, I’ve chosen WooCommerce plugin vendors based on marketplace reputation, dedicated support quality, code cleanliness, long-term reliability and – probably almost as importantly – where the “people behind” the plugin are active supporters of the WordPress ecosystem.

WooCustomizer

Sold by: WooCustomizer – Developed by: Zack Viljoen – 14 Day Money Back Guarantee

Hiding the “sorting dropdown” is one of the features of WooCustomizer, a plugin built for everyone who wants to fully customize their WooCommerce store without coding (e.g. edit buttons, badges, tabs, pages, stock display, checkout fields).

Share:

Leave a Reply