WooCommerce themes like to place a strong emphasis on navigation and ease of use for users. This is practically always a good idea as making your site as easy to search and browse as possible is an important way to ensure sales.
One of the default ways in which WooCommerce improves browsing your store is through a simple sorting dropdown on category and search result pages. This dropdown lets your customers rearrange the products they are seeing through a handful of default methods:
- Relevance (in cases of a search)
- Average Rating
- Price, Lowest to Highest
- Price, Highest to Lowest
These are great ways to sort a big list of products in a multitude of common ways. Of course, if your store doesn’t have a lot of products it can be kind of silly and useless to clutter your site with a sorting dropdown like this.
Who needs to be able to sort categories of two products, for example?
You can remove the sorting dropdown from your store with a couple of lines of code inserted into the right place in your theme files. Or you can use our Remove WooCommerce Features plugin and have everything behind-the-scenes handled for you without writing any code or editing any theme files.
How to Disable the Sorting Dropdown in WooCommerce through Code
Find your theme’s functions.php file and open it in any text editor you have. You’re going to want to go down to the bottom of that file and add the following lines of code:
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 ); remove_action( 'woocommerce_after_shop_loop', 'woocommerce_catalog_ordering', 10 );
After you’ve inserted that code you must save the file and then make sure the modified file is put back in your theme’s directory. If any of this sounds like a bit beyond your means or you are concerned with breaking your site you can hire a WooCommerce expert to make the change for you.
Keep in mind that changing your theme’s code, if done incorrectly, is not a permanent solution. Your changes to functions.php will be reversed as soon as you update your theme or swap it out with an entirely new design.
How to Remove WooCommerce Sorting Dropdowns with Our Plugin
The alternative solution to the one above is to purchase, install and activate our Remove WooCommerce Features plugin. Our plugin will let you remove sorting dropdowns from your search results and category pages in three easy steps.
Go to the WooCommerce section of your WordPress installation’s admin menu and click the link that says “Remove Features.”
Find the setting for “Sorting Dropdown” and click the checkbox so that it’s marked like so:
Press the “Save Settings” button.
And you’re done. Immediately your site will stop showing the sorting dropdowns. Now your customers won’t have their shopping experience cluttered with unnecessary interface elements they wouldn’t have found useful.
The best part is using our plugin to handle this means your choice will always go into effect regardless of what theme you are using or updating in the future. Your setting is never overwritten.
Remove WooCommerce Features offers the ability to disable a bunch of other parts of WooCommerce besides these sorting dropdowns. You can use the plugin to:
- Remove Product Image Lightboxes
- Disable the Enhanced Country/State Dropdowns in Checkout
- Remove Related Products
- … plus plenty more.
There are well over 20 different settings that the plugin lets you control. The full list can be found here on our site if you would like to learn more.