Identifying profile fields by field ID
-
I’m adding profile fields to the profile header using this function:
add_action( ‘bp_before_member_header_meta’, ‘display_user_phone’);
function display_user_phone() {
// echo ‘I choose this color: ‘;
$args = array(
‘field’ => ‘AD Roles’,// Field name or ID.
);$args2 = array(
‘field’ => ’16’,// Field name or ID.
);echo ‘<h5>’;
echo bp_member_profile_data( $args );
echo ‘</h5>’;
echo ‘<h5>’;
echo bp_member_profile_data( $args2 );
echo ‘</h5>’;
}However, when I attempt to use the field ID, it doesn’t display the profile information. Using the Field Name works perfectly. I need to access the ID b/c some of the Field Names are long and involve punctuation.
How do I enter the field ID to make this work?
Thank you!
- The topic ‘Identifying profile fields by field ID’ is closed to new replies.