Skip Navigation

[Resolved] Only showing parent categories in search filter

This support ticket is created 3 years, 11 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
- 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 5 replies, has 2 voices.

Last updated by Shane 3 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#1867645

I found this post here which does exactly what I need, almost. It hides the child categories in the category filter and just shows Parent categories:

https://toolset.com/forums/topic/how-do-i-limit-my-dropdown-to-show-only-first-level-in-a-taxonomy/

You can see this working on my site:
hidden link

The issue is that after the user selects a parent category then the filter shows all the cats, parents and children. Is there a way to keep it only showing parent categories?

Thanks,

Tim

#1868343

Shane
Supporter

Languages: English (English )

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

Hi Timothy,

Thank you for getting in touch.

Given that this is custom coding, we don't support custom coding. The probably cause for this is the use of the Ajax on your search.

You will need to disable the Ajax option on your search.

Thanks,
Shane

#1868569

I understand it's custom code, but it just seems to me that being able to easily show/hide certain categories, especially parent or children, should be a feature within the filtering system. I've seen lots of related posts to this so I'm clearly not the only one that expects to see something like this.

Yes, disabling Ajax search fixes this issue, but then this precludes me using this terrific, and much faster, search method for my users, so it's not really a good solution.

Tim

#1869449

Shane
Supporter

Languages: English (English )

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

Hi Tim,

Unfortunately not much we can do about this since it is not a native feature and is only possible through custom coding.

I can file a feature request for this but I can't say when or if it will be approved.

Thanks,
Shane

#1869679

No, I wouldn't bother with a feature request, I've tried about 10 feature requests and none get implemented. Frustrating.

#1873169

Shane
Supporter

Languages: English (English )

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

Hi Timothy,

I understand the frustration but not much that we can do at this point given the nature of the issue at hand.

Thanks,
Shane