PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

how to hide sorting filter (for example, "orderby:price low to high") in woof top panel?

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi there, when i use the sorting drop down of woocommerce on products archive/page, woof filter is showing this taxonomie in the top with"orderby:xxxx" (where woof checked filters are showing).

The user gets irritated because in his/her mind he/she is not using a"filter".

How can i hide/prevent this behavior?

i played around with conditionals under"advanced tab", but couldn´t find this"filter".

thank you and best regards

H.

Hello

Please  check  option - https://share.pluginus.net/image/i20210524131913.png

Hi Pablo, thank you, yes, i know that i can hide THE WHOLE Top Bar. But thats not the idea. The top bar itself is helpfull, but showing there a"filter" thats not a filter makes no sense to the user.

Hello

Ok Try  in  file  - wp-content\plugins\woocommerce-products-filter\js\front.js - add  code - https://share.pluginus.net/image/i20210525115903.png

if (index == 'orderby') {
return;
}

Clear  all  cache  and  do a test

Nice. Thank you Pablo. Works.

But how can i make this change permanent? It would break with every update. Any idea?

Hello

It would break with every update.  - yes!

You can override this JS function - https://wordpress.stackexchange.com/questions/26822/how-to-override-javascript-files-in-child-theme

Thank you again Pablo. Mmh, i´m aware that i can overwrite WHOLE js scripts in the child theme, but this would mean the whole script is prevented (in a way) from updating. If you change anything, i won´t even notice. Sooner or later things get broken.

 

I´m wondering if this wouldn´t be an option for your plugin to be selectable? I could guess, that a lot of people might be interested in this option too?

you  can  override  only  one  function

Ah, ok, thank you

Welcome;)

mmh, couldn´t find proper information on the net how to overwrite just one function. You have a hint?

Hello

read  this  - https://stackoverflow.com/questions/4814550/how-to-override-a-function-in-another-javascript-file/4814612

OR

just plug your function after mine