Skip Navigation

[Resolved] Categorize taxonomies

This support ticket is created 4 years, 6 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.

Our next available supporter will start replying to tickets in about 1.95 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 4 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#1354579

Tell us what you are trying to do?
Is there a way I can categorize taxonomies?

For example I have taxonomy named Colours
and I have the ff:
Blue
Red
Green
Yellow
Orange

what i wanna do is to show it in views but categorize into this
Colours
- Primary Colours
- Blue
- Red
- Green
- Secondary Colours
- Yellow
- Orange

is that possible?

and all those btw should be checkbox

Is there any documentation that you are following?
none so far
Is there a similar example that we can see?
none so for
What is the link to your site?
hidden link

Thanks
Regards,
Ben

#1354735

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

I'm not entirely sure what the objective is here, but it sounds like you should add hierarchies to your taxonomy.

So parent terms of "Primary colours" and "Secondary colours" with corresponding child terms.

On the page where you add terms in the backend you can specify the parent.

You may find this plugin useful in this case: https://wordpress.org/plugins/yummi-auto-check-parent-category-category-tree-checklist/

(I think there are others that do something similar, but that's the one that came up when I was searching.)

#1355485
demo-tax.png

Thanks for the reply Nigel
and apologies for the confusion

will just give the test data im using now

So im using a custom Post Type "Facilities" with a custom Taxonomy "Neighborhoods"

This a sample view where you can filter all facilities using taxonomy neighborhoods (in a checkbox format)
- hidden link

Now what I wanna achieve is to categorize those taxonomies
into something like this (see attachment demo-tax.jpg)

or check this page
hidden link

Under location field > advanced search

Thanks
Regards,
Ben

#1355577

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Ben

That test page, it's the search form of a View, right?

So you are looking at customising how the taxonomy filters is presented.

In that case there is not much you can do, the output of the filter controls is hard-coded and doesn't provide for any means to customise it.

Even if you have a hierarchical taxonomy, the terms are not displayed according to that hierarchy.

You would need an entirely custom solution.

You could output the filters as you currently have, then write some JavaScript to modify the markup for these filters to re-organise as you need.

One of the problems with that is when output as checkboxes there is nothing to identify the hierarchy.

If you switch to outputting the filters as a multi-select then at least the hierarchy is visible which gives you the basis to reorganise the filters.

Or you could study the markup that is output to identify what is required, then replace the filter control markup entirely with your own, by, for example, removing the shortcodes to insert the taxonomy filter controls and registering a custom shortcode that output the controls for the terms according to your needs.

In any case, I encourage you to submit a request to change how the filter controls are generated to allow for more customisation: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

The more requests we receive, the more likely it is that this will be improved.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.