Skip Navigation

[Resolved] The search filter

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

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+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#1267665

Tell us what you are trying to do?
I have a search page with a filter for categories. It is showing up fine. But I want to remove some (a lot) of the categories from the select dropdown. Like now ALL the categories for the post shows in the select dropdown no matter what I do.
Example page
hidden link
How do I choose what categories that ar showing in the select dropdown?

Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/front-page-filters/

Is there a similar example that we can see?
My example page is here
hidden link

What is the link to your site?
hidden link

#1267769

Nigel
Supporter

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

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

Hi there

What you need is a WordPress filter hook for the terms included in the Views taxonomy search filter control so that you can remove the unwanted terms before the select dropdown is generated.

Unfortunately we don't have one, and I suggest you request one: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

Otherwise, the only option is to modify this on the front end using JavaScript. You should use your browser dev tools to inspect the markup for the select dropdown and add a snippet of jQuery to remove the unwanted options.

Here's an article describing the kind of thing required: hidden link