Home > WooCommerce > Docs > How to Remove Product Sorting in WooCommerce

How to Remove Product Sorting in WooCommerce

Last updated: August 01, 2024
Written and researched by experts at AvadaLearn more about our methodology

By Sam Nguyen

CEO Avada Commerce

Are you seeking for a fast solution to eliminate WooCommerce’s default product sorting? This little guide will show you how to solve the problem.

Why do you need to remove Product Sorting?

You’ve probably seen the default sorting drop-down menu on the Shop and Archive Pages if you’ve used WooCommerce to develop your online store. On the storefront theme, the default shop page looks like this:

Remove the box if you don’t require it or if you want to improve the client experience on your online business.

How to remove completely Product Sorting Dropdown

Method 1: Via PHP

The following are the steps you must take:

  1. As the admin user, go into your WordPress site and go to the Dashboard.
  2. Click Appearance Menu > Theme Editor Menu from the Dashboard menu. Look for the theme functions file on the Theme Editor page to add the function that will eliminate the default sorting drop-down in the WooCommerce Shop and Archive pages.
  3. To the PHP file, add the following code:

/**
* @snippet Remove "Default Sorting" Dropdown @ WooCommerce Shop & Archive Pages
*/
add_action( 'init', 'njengah_remove_default_sorting_storefront' );

function njengah _remove_default_sorting_storefront() {
   remove_action( 'woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 10 );
   remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 );
}

  1. Simply reload the page to see the result, which should look like this:

Method 2: Using Plugin

In this part, we’ll use a plugin called WooCustomizer to build the same solution, which comes in a free and pro edition with a 14-day money-back guarantee.

This is a solution for folks who aren’t too comfortable with PHP. This is why we included this method, so that anyone, whether a developer or a WordPress newbie, may get the same effect. This plugin was chosen since it has a lot of favorable feedback and over 10,000 active installations in the WordPress community. It features high-quality code that has been thoroughly tested and is updated on a regular basis to keep any flaws at bay. Furthermore, it is being developed by people who are committed to the WordPress ecosystem. Follow these easy steps to deactivate the default sorting option with this plugin:

  1. As the admin user, go into your WordPress site and go to the Dashboard.
  2. After that, we'll install the plugin that we mentioned previously. Simply go to Plugins > Add New after you've downloaded it from the link above. Then, as indicated below, select Upload Plugin and then Browse for the downloaded file:
  3. Select Upload Plugin and then Browse for the downloaded file

  4. Navigate to Plugins > Add New in the Admin Panel to download it immediately. After that, you'll need to search for the plugin WooCustomizer using keywords. It must be installed and activated as follows:
  5. Navigate to Plugins > Add New in the Admin Panel to download it immediately

  6. Click WooCommerce > WooCustomerzer after activating the plugin.
  7. As stated below, click on Try out WooCustomizer Pro Settings:
  8. click on Try out WooCustomizer Pro Settings

  9. To view the changes you make, you must log into your WordPress site. To remove the WooCommerce Default Sorting Dropdown, go to WooCustomizer > WooCommerce Shop Page and select Remove Shop Sorting Dropdown as shown below:
  10. Go to WooCustomizer > WooCommerce Shop Page and select Remove Shop Sorting Dropdown

The result is:

result

Conclusion

We used two approaches to remove the default WooCommerce Product sorting functionality. The first includes using a PHP code snippet to create a basic yet elegant solution. The second option is to utilize a plugin that comes with a 14-day trial period before you have to pay for the complete version. However, we prefer utilizing the PHP snippet because it only requires a few steps and is completely free. We hope this guide helped you remove the default sorting option from your WooCommerce shop page.


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.