Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Buddypress Get user profile data function
Drop in functions.php
function getProfileData($fieldName){
global $bp;
return xprofile_get_field_data($fieldName,$bp->loggedin_user->id);
Example Usage - if you have a profile field called Authors Website
<?php echo getProfileData("Authors Website"); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment