remove product sorting drop down menu

How to Remove Product Sorting drop down Menu

Do you want to hide/ remove product sorting drop down menu on a woocommerce store?

remove product Sorting drop down Menu

It is quite easy to achieve and and there are two ways you can approach this. One is via PHP(recommended) and other is through CSS.

Remove sorting menu with PHP

In order to remove the product sorting drop-down menu with PHP, All you have to do is to do is add the following code snippet to your theme’s functions.php file.

Which is located in wp-content/themes/(name of your active theme) folder. You can access this directory with the help of FTP.

Or you can use code snippets plugin.  This plugin removes the need to add custom snippets to your theme’s functions.php file.

/**
* Remove Sorting drop down menu on WooCommerce Shop & Archive Pages
* Author: Garry Singh
* Source: https://wpglorify.com/?p=35408
*/

remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );

And, Voila this will remove the sorting menu on WooCommerce Shop & Archive Pages for you.

Hide sorting menu with CSS

If you want a quick solution or not comfortable editing the theme files. you can use CSS the below CSS code,

which you can add in Appearance » Customize » Additional CSS.

/*hide woocommerce product sort menu */
.woocommerce-ordering {
    display: none;
}

CSS Class might be different depending on your theme. You can check that by right-clicking on the drop-down menu box and inspect element.

On the final note

Have any question? Don’t forget to leave a comment below

If you think it was valuable in teaching Remove Product Sorting Dropdown Menu, Please support us on TwitterFacebook.

3 Comments

Leave a Reply

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