I’m calling this part 2, as we have resolved thread.
http://buddypress.org/forums/topic/display-username-in-members-directory
Does anyone know how I can modify this code into a new function, rather than overwriting bp_member_name? I’ve tried add_function instead, but didn’t work. Preferably I’d like to create a new function called bp_member_username.
function my_member_username() {
global $members_template;
return $members_template->member->user_login;
}
add_filter('bp_member_name','my_member_username');