Skip Navigation

[Resolved] Get categories search filter only go two levels deep

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years ago.

Assisted by: Christian Cox.

Author
Posts
#631394

I want to allow my users to search posts and filter results by category. I set up a view for it and it works a dream. The one problem is that I have lots and lots of nested categories, some of them four levels deep. So when you search and want to select a category, you have to choose from a massive list.

Is it possible to set up the filter so that the dropdown select menu only displays the first two, or even just the first level of categories? (nothing below sub-categories or sub-sub-categories)

#631616

Hello, there's not really a good way to filter the options in a taxonomy filter. Is this the only filter that will be applied to the View? If so, then you could accomplish something similar by creating a View of taxonomy terms filtered by term parent, and add custom links to each term. Let me know if you'd like some more information about this.

#632269

No, sadly, there are some other filters I'd like to apply as well... Have a look here: hidden link
Do you think the method you're describing might be applicable here?

#636898

In this case no, the method I was describing isn't going to work here. Another feature we offer allows you to create search filters that update whenever someone interacts with them, so that empty search results are not possible. Filters are removed if they would produce empty search results, so the effect would be that as more filters are added there become fewer filters to choose from. We have some information about only showing available options here: https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/

The forum ‘Types Community Support’ is closed to new topics and replies.

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