How to get a buddypress user profile link and a certain user profile field for the current post author?

For an author’s profile link, use

bp_core_get_user_domain( $user_id )

to get the URL, and

bp_core_get_userlink( $user_id )

to get an HTML link element, including display name.

For the xprofile data, use

xprofile_get_field_data( $field, $user_id )

$field can be either the name of the field (like ‘Biography’) or the numerical field id.

Leave a Comment