Tell us what you are trying to do?
I'm trying to set up a view that is query filtered by a taxonomy "Applications > Aerospace". But i ALSO want to use the taxonomy as a custom search field dropdown that is limited to the parent category and their child categories. e.g Aerospace > Aircraft; Aerospace > Braking Systems ...
Is there any documentation that you are following?
there are few and also chat gpt but i can't get a helping answer.
I hope you may help. Thanks for your assistance and kind regards
Hi there,
For the taxonomy default filter in the view you can use the query filter on the right sidebar of the View block settings to filter depending on the taxonomy that you have:
https://toolset.com/course-lesson/filtering-custom-lists-of-posts/
For the custom search items you can use the search section of the view to add proper search items following the steps below:
https://toolset.com/course-lesson/creating-a-custom-search/
Thanks.
Hi Christopher,
thanks for the information. These are things i already know. Maybe i have to clarify:
When i set the query filter to display CPTs by a taxonomy AND set a search field (dropdown) with the same taxonomy the view is no longer filtered by the previous query filter. But i need to set both and want the search field to only display the related child categories from the previous set filter. is there a way to achieve what we need?
Please see the attachment for that. As you may see the difference at the pagination.
Thanks and kind regards
Hi there,
If I understood you correctly then it is not possible.
The issue will be that the whole view shows only custom post type entries with a specific taxonomy.
Then it does not make sense to add a front end search for the sam taxonomy as it is already selected by the view filter.
What you can do is to avoid filtering the view by default and show all taxonomies and add the front end taxonomy as a search.
it most probably will be checkboxes, then you can use Javascript to select the taxonomy in question as soon as the page loads.
That way, the filter that you want will be there and also the customer can select other taxonomies if needed.
I hope it makes sense and if needed, please implement that and get back to us with the URL and we can provide the necessary Javascript code.
Thanks.