Passer la navigation

[Closed] search for custom post type via a taxonomy that has too many items for dropdown

This support ticket is created Il y a 2 years, 9 months. 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.

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Nigel Il y a 2 years, 9 months.

Auteur
Publications
#2650255
search for zip code to find region 2023.png

Tell us what you are trying to do? I want search via Zip Codes (Taxonomy) and return a Region (CPT). When I create a search form and select Filter by Zip Code, I have options for Type of Control. Problem is that there are too man Zip Codes for a dropdown or any of the options presented. Ideally I would like a field that visitors can type in the zip code and then return the Region.

I created a custom shortcode 2018 to do this, probably because of the same issue, but I wanted to see if I am just not doing the correct filtering.
Is there any documentation that you are following? Creating a search form from the Course » WordPress Real Estate Sites.

Is there a similar example that we can see? I'm not sure about what this question.

What is the link to your site?lien caché

#2650491

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01:00)

Hi there

There isn't really a built-in option with Toolset to handle a scenario where a View filter has a very large number of options (too many to practically display in a conventional select dropdown).

I think the best option would likely be to customise the dropdown to convert it with select2.

See their documentation at lien caché

You will need to enqueue their assets on the page with the View, and then initialise the select2 library on the View select filter.

Try that and see how you get on.

The topic ‘[Closed] search for custom post type via a taxonomy that has too many items for dropdown’ is closed to new replies.