Tell us what you are trying to do?
Building a custom search. The filters are working by now.
All the posts have some custom taxonomies. One (categorical) is named: "usecase" and has just two categories "sale" & "rent".
Now I try to achieve a view, which shows all posts whose term(s) for category includes "sale".
When I add the filter to my already configured custom search, then I do have the field as an option to the user. But I need a way to select the sum of posts including the term "sale" beforehand. Then in the next step the user can use the filter to work his way through the results.
Is there any documentation that you are following?
Tried a lot, but I'm confused and after my last experience searching the right way for days just to learn, that's a bug in Toolset, I now write here after just two hours of fiddeling....
Is there a similar example that we can see?
at the moment not.
What is the link to your site?
Local dev
Hello, are you saying you would like to completely remove the front-end filter that allows the User to choose "usecase" filter options and filter by the "sale" term, OR would you like to keep the front-end filter visible but pre-select "sale" as a filter option, allowing the User to modify that filter if they want?
If you prefer the first option, then you can remove the taxonomy filter control from the Search and Pagination panel of your View, and set the value manually in the Query Filter panel. If you cannot see the Query Filter panel, scroll up to the top right corner of the screen and click "Screen Options" to activate it. You can edit the existing taxonomy filter to match a specific term instead of responding to a URL parameter.
If you prefer the second option, then the only way to preselect a custom search filter and allow the User to modify it like this is to set the value using a URL parameter. For example, if the custom search View is on a page at https://yoursite.com/custom-search-page/ then if you want to preselect the "sale" filter option you would have to link to that page with the URL parameter already applied, something like https://yoursite.com/custom-search-page/?wpv-usecase=sale
Your URL parameter and term slugs may be different, this is just a general overview of how it would work.
Let me know if you have questions about either of these approaches.
Hey Christian,
thanks a lot for your help. It's the first usecase you mentioned. I now did find the Query Filter, it wasn't visible as you suggested. There I added the filter, but it doesn't seem to have an effect on the actual subset of posts.
But anyway, I'll have a deeper look into that the next days and then I'll come back with some more detailed informations. Tomorrow I won't be able to work on the project.
Thanks again!
Okay feel free to post back if you are stuck, I'll be glad to take a closer look. I'll stand by for your update.
My issue is resolved now. Thank you!