The woocommerce shop and archive pages are showing list of products with default sorting options. Most people would not want to prefer to keep the default sorting on the pages. The reason is it leave some empty space between the sorting combo box and the product list which looks odd. Most people do not want to keep the “Default Sorting” dropdown box in their Woocommerce Shop and Archive pages. In this article, you will see the small code snippet which removes Woocommerce “Default Sorting” dropdown from Woocommerce Shop & Archive Pages.
Remove “Default Sorting” dropdown from Woocommerce Shop & Archive Pages:
Here is the short code snippet that you can use to hide the “Default Sorting” dropdown box.
/** * @Description: Code snippet to remove "Default Sorting" Dropdown from WooCommerce Shop & Archive Pages */ remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
You need to put this code in the finctions.php file.
– Article ends here –