Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] Display user id


danbp
Participant

@danbp

Hi,

you need a function to do that.

Here’s one who will show the user id on profile header and on members directory.
Add it to bp-custom.php or child theme functions.php

function razman_user_id_display() {
	if ( bp_is_user() ) {
		$user_id = bp_displayed_user_id();	
	} else {
		$user_id = bp_get_member_user_id();
	}
		
	echo '<div class="myuser-id">My user ID: '. $user_id .'</div>';
	
}
add_action( 'bp_before_member_header_meta', 'razman_user_id_display' );
add_action( 'bp_directory_members_item', 'razman_user_id_display' );