Skip Navigation

[Resolved] Custom-search field with tags – would need to limit the number of tags shown

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by blazM-4 3 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#2068049

Tell us what you are trying to do?

I have a custom search with a Tags field. I have too many tags and would like to reduce the number of tags shown by not showing the ones with only one post (count=1). Can you direct me, pls?

I sort them by count, but I notice they're not always sorted correctly.

Another thing, a bit advanced feature (also a powerful feature). When multi-select tags, as in this example, are floated:left, they are nicely clickable. Would it be possible to click on them, and with each click, they would cycle through the relevant states for this type of search:
blue - include posts if contain it, but not mandatory,
green - mandatory, include posts if contained and exclude ones w/o it
red - exclude posts that contain it,
no hilite - tag not relevant

Is there any documentation that you are following? --- Checked a lot of it. I could not find any for this particular functionality.
Is there a similar example that we can see? --- You can check grantly.eu/admin - the tags are on the right
What is the link to your site? --- hidden link

#2068881

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset views offers the following hooks to filters the terms:
wpv_filter_taxonomy_frontend_search_available_terms and wpv_filter_taxonomy_frontend_search_get_terms_args

Can you please check what hooks fits in best as per your requirement:
=> https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_taxonomy_frontend_search_available_terms
=> https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_taxonomy_frontend_search_get_terms_args

#2073263

Thank you, even if at first, I would have liked a more directed guidance, it was more beneficial to direct me to the guides, which are very good and complete, so I learned much more and better.

My issue is resolved now. Thank you!