How to remove the "Sort by" dropdown in WooCommerce

One of the fixed elements in the page any store created with WooCommerce is a drop down that allows the visitor to order the products by popularity, valuations, price and news.

Although it may seem useful, in reality it does not always meet the needs of the store manager, that if you have already been careful to order the products in the way you prefer to obtain optimal sales, it is possible that you prefer that it does not show that drop-down .

In any case it is a customization option, that if you want to do it, it is easy to get, if what we want is to go through this …

To this other …

To hide this fold-out from your WooCommerce store you just have to add the following code to the file functions.php ] of the subject son or a your customizations plugin :

If it does not work, try this one:

and if you use the subject StoreFront the code to use is this:

If you are using a son theme of StoreFront sometimes, for reasons of order of function calls, the previous code might not work, in which case try this one:

Finally, if for some reason the active topic has modified hooks of WooCommerce functions and the previous codes do not work also p You can hide the drop down using CSS in your style sheet. It is not advisable but sometimes it will be necessary.

You just have to add the following to the style.css of your theme:

Nothing else, I hope. If it works, tell us in the comments, and if you know another way to do it or it does not work for you too.

Loading …

It might help you too: