I recently launched an ecommerce website where all the products have a standard price. With the use of analytical tools such as Hotjar, I observed some of my users trying to sort the shop items by “Price: Low to High” which unfortunately made no difference considering everything is priced at £7.50.

This was providing a poor user experience and as such, I decided the best action was to remove some sort options from my shop drop down.

I did this by adding the following code to my functions.php file, remember, before editing your theme files be sure to make a backup in case anything breaks:

// Removes drop down sorting options//
// Options: menu_order, popularity, rating, date, price, price-desc
function my_woocommerce_catalog_orderby( $orderby ) {
unset ($orderby["price-desc"]);
return $orderby;
}

add_filter( "woocommerce_catalog_orderby", "my_woocommerce_catalog_orderby", 20);

Was this post helpful?