Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Using xProfile custom field values


John James Jacoby
Keymaster

@johnjamesjacoby

Shouldn’t change anything? I would maybe build a custom function to get around globalizing anything in the theme though…

Something like…

function custom_member_list_xprofile_data($field) {
global $site_members_template;

return xprofile_get_field_data($field, $site_members_template->member->id);
}

Then in your members-loop.php use it like…

<?php echo custom_member_list_xprofile_data('Address') ?>

In members-loop.php, the function “bp_the_site_member()” loads up the next user in the loop, so you have the data there to use; you just need to gather it correctly and prepare it for display.

Skip to toolbar