Forums › Forums › Search & Filter Pro › Multiple category fields
- This topic has 11 replies, 2 voices, and was last updated 6 years ago by Trevor.
-
Anonymous(Private) October 11, 2018 at 1:49 pm #190750
Hi there,
I have a category structure like this example:
A(50)-> A_1(50) -> B_1(10), B_2(20), B_3(20)
A(50)-> A_2(50) -> C_1(11), C_2(39)
A(50)-> A_3(50) -> D_1(5), D_2(25), D_3(20)A, A_x, B_x, C_x and D_x are categories, the numbers represent the posts in each category.
A is the parent category. A_x are the child category of A category. B_x are the child categories of A_1 category, C_x….you get the point. Each of the 50 articles, is present in each A_x child categories.Now I would like 3 fields for categories A_1, A_2 and A_3 so that the user can specify exactly the category combination for specific posts (e.g. all the posts which belongs simultaneously to categories B1, C1 and D3).
I tried but I don’t know how to accomplish that. Any suggestions?
Thanks
Trevor(Private) October 11, 2018 at 4:22 pm #190777You need to separate out groups, branches or parent/child tags into separate custom taxonomies. In general, you can use a particular Taxonomy, such as Product Category, (or Category/Tags, each Taxonomy and each Custom Field) only once in the form. 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).
Anonymous(Private) October 11, 2018 at 4:54 pm #190801ok thanks for your answer.
So let’s suppose I convert the category in three different custom fields which correspond to categories A_1, A_2 and A_3.
Can I add then 3 filters in the search form, one for each custom field?
It seems to me I cannot use the same filter more than once anyway. -
AuthorPosts