Skip Navigation

[Resolved] Setting up parent and child taxonomies

This support ticket is created 4 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by catrionaD 4 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1719703

Hi Christian,

On my non-profit website I list services, stories and products that help people through big life challenges.
I am recategorising and restructuring how the search and navigation works and would like some advice on how to do this please.

I have created three custom post types: services, stories and products.

Each of these should be 'assigned' to one or more of the following taxonomies:

A. Topic e.g. health or money
B. Topic area e.g. for "health" = mental health, body, children's health
C. Category e.g. for "mental health" = addiction, anxiety, bi-polar
D. Sub-category e.g. for "addiction" = alcohol, drugs, gambling

What is the best way to set up this taxonomy structure to enable:

1. A user searches for a problem. For example, they search for "addict" and then a user can:

1a: Select a search suggestion (I understand this is possible with Relevanssi). The search suggestions will relate to Topic areas (e.g. mental health), Categories (e.g. "addiction") and/or sub-categories (e.g. "alcohol addiction")
or
1b: Hit return, or submit button, and be taken to a results page which displays suggested Topic areas, Categories and Subcategories relating to the search term (perhaps in a breadcrumb format?)

2. From there, a user can either select a Topic area, Category or Sub-category.

2a. If they select a Topic area, such as mental health, they are taken to a page which lists all categories related to the Topic area. For example, "Mental health" topic page will display the categories: addiction, anxiety, bi-polar etc.
When the user selects a Category they are taken to a Final Results page. The Final Results page shows related services, stories and products which they can narrow by sub-category or other filters. The other filters will depend on whether they are filtering services (type of service, opening hours) or filtering products (product type, cost).
or
2b. If they select a Category, such as addiction, they are taken to the Final Results page (as above).
or
2c. If they select a Sub-category, such as alcohol addiction, they are taken to the Final Results page which includes the Sub-category filter "alcohol" which is pre-selected for them.

Any advice on how to set this up is very welcome, particularly in relation to the taxonomy structure, I'm stuck!

Many thanks,
Cat

#1721021

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Catriona,

Thank you for getting in touch.

Let me see how best I can assist with this one.

What is the best way to set up this taxonomy structure to enable:

1. A user searches for a problem. For example, they search for "addict" and then a user can:

1a: Select a search suggestion (I understand this is possible with Relevanssi). The search suggestions will relate to Topic areas (e.g. mental health), Categories (e.g. "addiction") and/or sub-categories (e.g. "alcohol addiction")
or
1b: Hit return, or submit button, and be taken to a results page which displays suggested Topic areas, Categories and Subcategories relating to the search term (perhaps in a breadcrumb format?)</b>

A. Naturally Taxonomies can have Parent/Child setup so the user can select their main category and then select the sub category under which this post falls under. So they do have that option.

<b>2. From there, a user can either select a Topic area, Category or Sub-category.</b>

A. With the taxonomy they can select this. The problem may come with the searching because you are not able to separate the child topics from the Parent topics or category into a separate filter. All the options will be presented on the same filter.

<b>2a. If they select a Topic area, such as mental health, they are taken to a page which lists all categories related to the Topic area. For example, "Mental health" topic page will display the categories: addiction, anxiety, bi-polar etc.
When the user selects a Category they are taken to a Final Results page. The Final Results page shows related services, stories and products which they can narrow by sub-category or other filters. The other filters will depend on whether they are filtering services (type of service, opening hours) or filtering products (product type, cost).
or
2b. If they select a Category, such as addiction, they are taken to the Final Results page (as above).
or
2c. If they select a Sub-category, such as alcohol addiction, they are taken to the Final Results page which includes the Sub-category filter "alcohol" which is pre-selected for them.</b>

This is actually quite a complicated setup as here you are referring to a chain list of archive based on your previous selection, which essentially isn't possible out of the box with our Toolset Blocks plugin, so you wouldn't be able to achieve this one.

Thanks,
Shane

#1721047

Hi Shane,

Thanks. Recognise there was a lot to that question, perhaps better to break it down.

1. A user searches for a problem. For example, they search for "addict" and then a user can:
1a: Select a search suggestion (I understand this is possible with Relevanssi). The search suggestions will relate to Topic areas (e.g. mental health), Categories (e.g. "addiction") and/or sub-categories (e.g. "alcohol addiction")

I had thought with Relevanssi I can specify keywords that a user could begin typing, such as "addict", which would then prompt search suggestions (like google does). Each 'search suggestion' has a destination URL which would equate to a results page for a particular category or sub-category.

Is this possible? If so, can you please direct me to documentation/ guidance for this?

Many thanks,
Cat

#1723019

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Catriona,

1. A user searches for a problem. For example, they search for "addict" and then a user can:
1a: Select a search suggestion (I understand this is possible with Relevanssi). The search suggestions will relate to Topic areas (e.g. mental health), Categories (e.g. "addiction") and/or sub-categories (e.g. "alcohol addiction")

The main problem is that we can't separate the sub categories from the main categories. It will all be under 1 filter. What will happen is that when you perform a search on ADDICT you can have your view filters re-adjust automatically to only the item that are relevant to Addict, so you will only see Addiction and Alcohol addiction in the filter and all other categories not related to this will be hidden.

Our Views/Blocks search is essentially a dynamic filter that can allow you to filter your posts based on their filterable attributes. So the filters will only re-adjust to what the relevant result is.

You can have another quick look at our search documentation for a quick look of what is essentially possible.

https://toolset.com/course-lesson/creating-a-custom-search/

Thanks,
Shane

#1727481

My issue is resolved now. Thank you!