I have a view to list the user, how can I add a search bar and sorting button to the view
Hi,
Thank you for contacting us and I'd be happy to assist.
The user views don't support the custom search or sorting controls feature.
For creating a fully customizable list of users which can also be used for the search and sorting controls, you can add a new custom post type 'User Profile'. Each post in this post type will be linked to each user on the website, as explained in this guide:
https://toolset.com/lesson-placement/lesson-placements-1622969-1929573/
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
Dear Waqar,
Yes, I did it to create a custom post and linked to each user, but not all subscribed user require the custom post linkage. I view the user and want to search or sort them and then execute the hook to create the custom post and link to the user if the user is qualified to be the member in system. Any idea?
In the suggested approach and for inclusion in the user search system, it is important that one 'User Profile' post is created for every registered user.
Think of this post as a part of the registration process and not as part of the content creation. The user search will be performed on these 'User Profile' posts and not on the WordPress 'users'. This means any user who doesn't have a 'User Profile' post won't be included in the user search.