How to grab data after wp user search is complete


In the wp backend wp-admin > users.php there is a search field which we can use to search for particular users.

Let’s say we search for a string ‘test‘ and it retrieves 3 users.

How can we grab the User ids of those results and display in a custom plugin? Is there a wp filter/action available that runs after the search is complete? I am familiar with pre_user_query and pre_user_search hooks but those run before the query is executed. But I think I am looking for a post query hook and I don’t think there is any so in that case how can we do this?

Any help / guidance would be highly appreciated.


bakar 3 months 0 Answers 8 views 0

Leave an answer