Forums › Forums › Search & Filter Pro › Category parents as dropdowns, with child categories as checkboxes?
- This topic has 6 replies, 2 voices, and was last updated 9 years, 2 months ago by
Trevor.
-
Anonymous(Private) January 17, 2017 at 2:54 pm #83138
Hello,
I’m new to Search and Filter Pro. I’m looking to build a filter which lists a selection of pre-determined category parents which act as dropdowns, which on click then expand to reveal the relevant child categories as checkboxes.
In addition, the active filters should ideally be shown in a list below the filter options, with the option to remove them.
Something like the below is what I’m looking to achieve:

In my limited knowledge, I can’t see that it’s possible to achieve these in within the Search and Filter PRO interface options. I can see there is an option to tick ‘Hierarchical’, but no options with the Search Form UI to change the parents to dropdowns, nor limit to specific category parents only.
Could someone please help to point me in the direction.
Trevor(Private) January 17, 2017 at 5:42 pm #83179I am fairly sure we can’t do the checkboxes thing within dropdowns (but you might be able to fake it with javascript, the big issue is that you must not use category (or any other form field) more than once in a form. If you have multiple parent/child relationships in categories, it might be better to have separate custom taxonomies for these. This post tries to explain this a bit better (you can use a plugin to switch category terms from category to any new taxonomy that you make, so it is not so hard to do). It is a really awful preachy lecture I wrote ? :
https://support.searchandfilter.com/forums/topic/multiple-categories-combination/#post-55166
Sorry about the tone, but the message is right and it links to good plugins (except taxonomy switcher I think). If I missed anything (I probably did, my apologies), follow up and nudge me.
Anonymous(Private) January 18, 2017 at 4:23 pm #83456Hi Trevor,
Yes I originally thought of custom taxonomies, unfortunately it’s an existing site in which there are thousands of articles, all heavily reliant on the existing category system. So would be an element of migration involved, though this might be worth the initial headache to benefit the long term.
Thanks for your advice and for the linked article. The “preachy lecture” reads just fine to me 😉
Trevor(Private) January 18, 2017 at 4:37 pm #83469It depends on what that reliance is. Menus maybe? The taxonomy switcher allows you rather painlessly to move taxonomy terms from one taxonomy to another for existing posts. All you need is the source taxonomy name (e.g. category), the ID number or numbers of the terms, and the new taxonomy name. One click and its done. Be careful to move parents and children together though!
The checkboxes inside a dropdown we are looking at for the next major version release (v3), but that is many months away.
-
AuthorPosts