Hello Dale,
Thank you for posting here. Please download the following plugin:
https://github.com/buddydev/bp-shortcodes/archive/refs/heads/master.zip
and use the following shortcode
// For Logged in user id. [bpsc-user-id context=logged] // For Displayed user id. [bpsc-user-id context=displayed]
Please let me know if works or not.
Regards
RaviThanks for your reply,
before your reply I used this code: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”>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’ );and worked with a shortcode
Thanks
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
This topic is: not resolved