Home›Toolset Professional Support›[Resolved] How to filter taxonomy select filter options for the taxonomy added as frontend filter with view
[Resolved] How to filter taxonomy select filter options for the taxonomy added as frontend filter with view
This thread is resolved. Here is a description of the problem and solution.
Problem:
How to filter taxonomy select filter options/terms for the taxonomy added as frontend filter with a view on multiple pages
Solution:
There is no native solution to filter the taxonomy filter options. The workaround would be to filter your taxonomy query with WordPress standard hook: pre_get_terms
It's post id is included in the code and initially works however in the area box, click and select an area, don't click SUBMIT.
Now click to change the area, everything is in the search...all the sub areas.
Why is this please?
I guess I am testing however is a visitor selects and area, does a search then changes their mind and changes the area, all the sub areas appear. This not ideal as we intend to add many more.
The thing is that as you know I shared the workaround, there is no such feature and its custom code as well.
Its up to you if you want to go with a workaround or use the product as per the features provided. Unfortunately, I can share workaround and guide you but I do not have any control on its performance as its not native feature added to the product.
What if you try to change the if condition code as follows:
Can you please go to your screen options on that page at top right corner and uncheck the field checkbox.
if you are not using that custom field, then you should simply go to Toolset => Custom fields => Term fields and unassign the custom field group from your taxonomy.
As I shared with my previous reply: if you are not using that "Display on Home?" custom term field, then you should simply go to Toolset => Custom fields => Term fields and unassign the custom field group from your taxonomy.
No - I do not add any other code as far as I know 🙂