Skip Navigation

[Resolved] Views – Search box for User First, Last Name and user email

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to create a custom search View for Users.

Solution: It's not currently possible to create a parametric or custom search View for Users directly, but you can use a proxy post type as described in the documentation below.

Relevant Documentation:
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

This support ticket is created 5 years, 3 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by leilaG 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1325485

Is it possible to search a users Name and email in a VIEW?

#1325501

Hi, unfortunately there is no parametric search feature for Users, not directly. However, you can implement a proxy post type as described here: https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/
Each User is the author of one post in some custom post type, and all the pertinent User information exists in that custom post. Then you can create a custom search View for this custom post type. This technique also gives you the ability to create post relationships between Users and posts, by proxy.

#1325513

Hey! Does each user have to create one post for this work?

#1325519

Yes that is required, or you can create the post programmatically upon User registration using the Forms API. Some examples here in the forum:
https://toolset.com/forums/topic/auto-create-custom-post-after-new-user-submission/
https://toolset.com/forums/topic/have-a-band-admin-role-to-manage-cpt-band-listing-page/

#1325793

I understand. Thank you for the information and links