show user-id beside nickname

Home Forums Legacy Support Support queries How-to & Troubleshooting show user-id beside nickname

Tagged: , ,

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #336375
    RagabSalem
    Spectator
    Hello, how are you? I need users to show there user-id in the dashboard beside her nickname. Thank you,
    #336377
    RagabSalem
    Spectator
    This reply has been marked as private.
    #336455
    RagabSalem
    Spectator
    hello
    #336551
    Diana
    Participant
    http://prntscr.com/xp60g6 There is no filter hook there, But I can share a custom shortcode which will show user id, you can use that widget in the Profile layout or in the widget as well, it will show userid of the current logged in user
    #336570
    RagabSalem
    Spectator
    yes, i use short code that i made by php plugin shortcode but i need your theme shortcode if you can share with me. but i'm still need to show the id for user in welcome page that will help me alot.
    #336572
    RagabSalem
    Spectator
    This reply has been marked as private.
    #336576
    RagabSalem
    Spectator
    This reply has been marked as private.
    #336580
    RagabSalem
    Spectator
    This reply has been marked as private.
    #336903
    RagabSalem
    Spectator
    ?
    #336917
    Diana
    Participant
    
    add_shortcode('show_current_user_id', 'renderCurrentUserId');
    
    function renderCurrentUserId($atts){
        $user_id = get_current_user_id();
        if(!empty($user_id)){
          echo $user_id;
        }
        else echo '[show_current_user_id]';
    }
    
    This will be the shortcode [show_current_user_id] And I can't show userid besides that hello icon because there is no filter hook on which I can write custom code This code you have to add in wplms customizer plugin, and wherever you use this shortcode it will start showing the current logged in user id
    #337426
    RagabSalem
    Spectator
    This reply has been marked as private.
    #337619
    Diana
    Participant
    Your students are using social logins? instead of creating account first and then login
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘show user-id beside nickname’ is closed to new replies.