Reply To: Display Name in Group Member Search — is there a functions.php equiv. in admin?
Hey, your answer turned me onto bp-custom though and it was helpful to read what you’d originally shared too. WordPress to BuddyPress… a bit different, but very cool stuff.
For those interested, the problem was that the nonprofit had several usernames/emails identical to each other. The default “add new user” search in the groups admin area was for user_name and user_email… not helpful in this client’s case. aces responded with https://codex.buddypress.org/developer/customizing/customizing-labels-messages-and-urls/ which, while not the right solution for this specific problem, turned me onto this
https://codex.buddypress.org/developer/customizing/bp-custom-php/, which is (or at least it works… is there ever the one right solution? not sure.”
In any case, I created a bp-custom.php file and unhooked the original search function
remove_action( ‘wp_ajax_bp_group_admin_member_autocomplete’, ‘bp_groups_admin_autocomplete_handler’ );
Then I changed the autocomplete handler to show display_name and added the action back in
add_action( ‘wp_ajax_bp_group_admin_member_autocomplete’, ‘mbb_groups_admin_autocomplete_handler’ );
This one is solved. Turned out it was simple after all. @aces, thanks for sharing what you did. I read over the link you shared and saw the link to bp-custom, which somehow I didn’t find when I was looking into this earlier. I appreciate your help and it looks like the problem is solved 🙂