Hi,
I have a CPT view here enlace oculto which I can filter with the search form next to it correctly.
When I filter the loop by a taxonomy term, the rest of filters in the search form hide the taxonomy terms that don't belong to any of the filtered items in the loop.
I have duplicated the whole view and assigned it to the taxonomy view for this CPT but the search form doesn't work as I expected.
Here is an example: enlace oculto
This is a taxonomy view which only returns two items for the given taxonomy, but the search form filter allow me to select all the terms available for all the items, not only the filtered ones.
In the example above, the search form should only display the tems like this: enlace oculto
¿Is it possible to have this behaviour of the search form in the taxonomy view?
Thanks
Daniel
You can not have Custom Filters on Taxonomy Views or User Views.
Only Post Views can have taxonomy Filters.
I am not even sure how you brought the Custom Search Form to be visible on a Taxonomy View, this is not possible since the Filter section is not avialble - I mean the "Add filter" Button is not present.
For the exact reason that this is not possible.
Probably duplicating the View makes the filter appear, since the View does at the moment of duplication not know that you are going to query Taxonomies.
This will not work. Taxonomies can not be Queried with a Custom Search.
Thank you Beda
I won't use this method then. What I want to achieve is to re-use the same View here: enlace oculto in other pages but with the list of items already filtered by a taxonomy.
So a user enters that page displaying already filtered content and they only see items in that taxonomy. They should be able to use the search form next to it to go deeper in filtering the results.
I'm trying to avoid creating new views in the backend if this is posible.
In the documentantion I found something about using the view shortcode but with filtered content. I don't know if this is the right way.
You can do that.
YOu duplicate your View, and now add a Query Filter for the taxonomy you want to filter by.
Keep in mind a Query Filter can be used only once, this means, if you query filter by a Taxonomy, you can not add this same taxonomy to the Custom Search.
This will allow you to present "narrowed down" Views (that output only a certain chunk of information) and then "fine filter" by other terms, field values or Parent Relationships on the Custom Filter.
Thank you Beda!
I was able to get it applying the filter with shortcode attributes.