Home › Forums › Basel support forum › Remove some elements from filter "Sort by" Remove some elements from filter "Sort by" This topic has 3 replies, 2 voices, and was last updated 7 years ago by Artem Temos. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts December 10, 2017 at 2:58 am #28107 svaldesmParticipant Hi, Sorry for all the questions but I’m setting my store up and running, hope just bother you guys for a week and then you’ll never hear from me again. I would like to remove some elements (for example, “Default”, “Popularity”) from the Sort by filter. I think it’s made via a functions.php code but so far haven’t been able to make it work. Thanks!! December 10, 2017 at 3:00 am #28108 svaldesmParticipant OK I already found the solution. In case someone else is looking, this worked for me: function my_woocommerce_catalog_orderby( $orderby ) { unset($orderby["menu-order"]); unset($orderby["popularity"]); unset($orderby["rating"]); return $orderby; } add_filter( "woocommerce_catalog_orderby", "my_woocommerce_catalog_orderby", 20 ); December 10, 2017 at 3:08 am #28109 svaldesmParticipant Also if you would like to set one as default, this works: // Set date as default order function default_orderby() { return('date'); } add_filter( "woocommerce_default_catalog_orderby", "default_orderby", 20 ); December 10, 2017 at 12:52 pm #28183 Artem TemosKeymaster Hi, Great, we are glad that you have found the solution. Regards Author Posts Tagged: filter remove Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to create new topics. Login / Register