Hi,
This is a follow up to this ticket.
https://toolset.com/forums/topic/how-to-select-only-the-parent-terms-in-a-taxonomy-while-showing-in-filter/
Is this possible now? I want to only allow visitors to filter by the parent taxonomy. This should bring back all posts that match the parent as well as any children of that parent.
thanks
Hi, this feature has not been implemented since the previous ticket. It would require custom code that falls outside the scope of support we provide here in the forum. However, if the top-level taxonomy term filter is the only filter you want to include in the View, I can show you how to accomplish something similar with another View of this taxonomy. Unfortunately this approach only works when the taxonomy filter is the only filter shown on the front-end of the site, so let me know how you would like to proceed.
Would search count as another filter? That is, would your method work with a set of parent checkboxes PLUS search work?
If not, any place you can point me towards for advice on how to build what I need?
Thanks,
Anthony
Yes, search counts as another filter so the approach I was considering won't be helpful for you. If I wanted to build this I would start by creating the Query Filter that responds to a URL parameter. Try to grasp how the URL parameter will work with the search filters, then create the select field directly in the Filter Editor panel using some hard-coded data. Work on getting the filter updating the URL as expected and producing the correct results. Then look into the get_terms API and figure out how to create the select field dynamically instead of using hard-coded data.