Answers for "buddypress member directory add xprofile field"

0

buddypress member directory add xprofile field

function my_directory() {	
if ( bp_is_active( 'xprofile' ) )

	if ( $memberfax = xprofile_get_field_data( 'Fax', bp_get_member_user_id() ) ) :
		echo '<br/><div class="Fax">';		
		echo $memberfax;
		echo '</div>';
	endif;	

}
add_filter ( 'bp_directory_members_item', 'my_directory' );
Posted by: Guest on December-04-2020
0

buddypress member directory add xprofile field

$field_data = xprofile_get_field( $field_id, $user_id, true );
$field_value = $value->data->value;
Posted by: Guest on December-04-2020
0

buddypress member directory add xprofile field

add_action( 'bp_directory_members_item', 'bpex_add_profile_field_data' );

function bpex_add_profile_field_data() {
    $field_data = xprofile_get_field( $field_id, bp_member_user_id(), true );
    $field_value = $value->data->value;
    
    echo '<span>' . $field_value . '</span>';
}
Posted by: Guest on December-04-2020

Browse Popular Code Answers by Language