I was able to get this working using template overrides at the following paths:
child-theme-folder/buddypress-global-search/loop/member-ajax.php
child-theme-folder/buddypress-global-search/loop/member.php
(You don’t need to include the ‘templates’ folder.)
My code to add extra info to the members template is like:
<div class="item-desc">
<?php
if(xprofile_get_field_data( 'Phone', bp_get_member_user_id() )) {
echo '<strong>Phone:</strong> ' . xprofile_get_field_data( 'Phone', bp_get_member_user_id());
}
if(xprofile_get_field_data( 'Phone', bp_get_member_user_id() )) {
echo '<br /><strong>Email:</strong> <a href="mailto:' . xprofile_get_field_data( 'Email', bp_get_member_user_id()) .'">' . xprofile_get_field_data( 'Email', bp_get_member_user_id()) . '</a>';
}
?>
</div>
e.g.
xprofile_get_field_data( ‘X_PROFILE_FIELD_NAME_HERE’, bp_get_member_user_id())