In this tutorial we will learn how to remove the sorting dropdown from Woocommerce product listing page i.e. shop page.
Before moving to the solution I assume that you’ve created one or more products in your Woocommerce shop. If you haven’t created any product got to the admin panel and add a product.
The task is pretty simple and you don’t need to dig into Woocommerce’s code to achieve that. It can be done easily by using a hook provided by Woocommerce.
Initially the shop page will look like this
So open functions.php file of your theme and Add the following code to the functions file.
// remove default sorting dropdown remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
Refresh the page and the sorting dropdown must be removed from the shop page.
Don’t forget to clear cache if enabled.