WordPress Managed Hosting - 100% Off For 3 Months - Coupon Code: WPB30 Avail Now

An Easy Guide On How To Remove Default Sort Option in WooCommerce

Moeez — February 27, 2018 2 Minutes Read
WooCommerce sort option

WooCommerce stores with a few products do not often need the sort dropdown menu on the shop and product pages. In fact, the sort option is considered an unwanted part of the UI. A related element is the standard notice of the number of items/results.

Fortunately, removing these elements are easy to remove. In this tutorial, I will show the simple process of removing these two UI elements. Here is how the store looks before the changes are applied:

To start, confirm that default sorting is enabled. if not, enable it from the backend. Go to Settings > Products > Display and then to Default product sorting. Select any option from the menu.

To make the changes, open up the functions.php file and add the following code snippets:

This snippet will remove the default sorting dropdown from all pages

Here is how the shop page would look like after the addition of the snippets:

Create Faster WordPress Websites!

Free eBook on WordPress Performance right in your inbox.


Create Faster WordPress Websites!

Free eBook on WordPress Performance right in your inbox.

Moeez is ‘The’ blogger in charge of WPblog. He loves to interact and learn about WordPress with people in the WordPress community. Outside his work life, Moeez spends time hanging out with his friends, playing Xbox and watching football on the weekends. You can get in touch with him at moeez[at]wpblog.com.

THERE'S MORE TO READ

Newsletter

Cloudways Grand Ecommerce Giveaway 2020

Win Premium WordPress Themes, Plugins and Tools

Secured By miniOrange