Forums › Forums › Search & Filter Pro › Filter search by Category and Sub Category
- This topic has 3 replies, 2 voices, and was last updated 7 years, 4 months ago by Trevor.
-
Anonymous(Private) August 17, 2017 at 9:16 am #126348
I wish to search pages and posts by Category in the first dropdown, then Sub Categories of that category in second dropdown. For example if I arranged my posts as such
Categories
ARCH
doric (sub cat)
MATH
Caculus (sub cat)I would select drop down one and ARCH, then dropdown two would display ONLY Doric, I would select that and then submit form and results would be all pages or posts within doric sub cat of ARCH.
Trevor(Private) August 17, 2017 at 1:40 pm #126409Hi Jerry
You can use Category (or Tags, each Taxonomy and each Custom Field) only once in the form. You would need to make additional taxonomies. This post tries to explain this a bit better (you can use a plugin to switch category terms from media-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.
Trevor(Private) August 18, 2017 at 12:23 pm #126624Ah. OK. I think I get it. Three conditions are necessary for this to work as I think you wish.
Firstly, the Classes and the Subjects need to be in separate taxonomies (category and tag are special taxonomies that WordPress defines associated with normal (core) posts). They must not be parent/child lists inside a single taxonomy.
Then the other two conditions are that on the General settings tab, both Auto Count settings are ‘ON’, AND
In each form field, the ‘Hide empty’ settings are ‘ON’
As choices are made, this then causes the lists to be auto filtered.
-
AuthorPosts