Sauter la navigation

[Résolu] Custom Search containing a dropdown with field value

This support ticket is created Il y a 2 mois et 1 semaine. 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)

Ce sujet contient 2 réponses, a 1 voix.

Dernière mise à jour par christophW-2 Il y a 2 mois et 1 semaine.

Assisté par: Minesh.

Auteur
Publications
#2802460

Tell us what you are trying to do?

I have a page with a block view (lien caché) and want to insert a custom search with a dropdown, which contains a posts field to choose from. Each of my custom posts contain a field "Canton", and I need, that a visitor can choose the avilable Cantons and then all the posts from this Canton are showing up. When I add a new search field, I can't find the post fields to choose from. What am I missing?

I have added a screenshot.

Regards
Christoph

#2802485

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

When you say post field - do you mean you want to search by post title? if yes:

You can add the text search.
- https://toolset.com/documentation/legacy-features/views-plugin/filtering-views-for-a-specific-text-string-search/

Are you looking to search by post title or something else?

#2802487

Hello. It's hard to explain :).
I have a custom post type with a field "Canton" (marked in screenshot1).
In the search, I want a dropdown menu where a visitor can select the Canton he would like and then all the posts for this entries are shown. Like on this page: lien caché (also made with Toolset).

#2802495

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Can you please send me admin access details and also share on what page you added your view.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2802671

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

I checked and the strange thing is that with the view block the custom field name is not available when you try to add the new filter but if you create a view in legacy mode from Toolset => Views and try to create a new view and select your post type as source of the view and try to add a new search filter - I can see the custom field available to add as a search filter.

I suggest you should try to create a custom searh view using the legacy view and that should help you to add the custom search field as search filter:
=> https://toolset.com/documentation/legacy-features/views-plugin/front-page-filters/

#2803396

Thanks for the help. That is really strange, but somehow it works like that.
Thanks and regards
Christoph