Getting the BuddyPress user profile link

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.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *