Woocommerce: How to remove default sorting drop-down from shop page?

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.

2015-08-26_1515

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

2015-08-26_1516

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.

2015-08-26_1518

Don’t forget to clear cache if enabled.

Waqas

I hope you enjoy reading this blog post. If you want my team to do WooCommerce Maintenance for you, click here.

1 thought on “Woocommerce: How to remove default sorting drop-down from shop page?”

Leave a Comment

Your email address will not be published. Required fields are marked *