Passer la navigation

[Résolu] How do I do an "OR" search on user search filters?

This support ticket is created Il y a 4 years, 3 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.

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 -

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

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Minesh Il y a 4 years, 3 months.

Assisté par: Minesh.

Auteur
Publications
#2069435

Hello, how is everything?

I created a view that searches for users.

In this view, there is a search field (created by hand, with html).

I add the filter to search for a custom field. working perfect.

but I need to add other filters.

how do I do an "OR" search on the filters? Only "AND" appears.

The customer would like a single field on the screen to search in various custom fields.

I haven't found how to do it.

I'm waiting

thanks

#2069929

Minesh
Supporter

Les langues: Anglais (English )

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

Hello. Thank you for contacting the Toolset support.

Frist of all, as you may already know that custom search is not supporter with user and taxonomy kind of views and you are already using the user view and using the workaround.

To filter the user query on fly, you can use the view's filter hook: wpv_filter_user_query
=> https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_user_query