Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display username and avatar


  • jameshh93
    Participant

    @jameshh93

    Hello I was wondering if some one could help me display if logged in show username and user avatar next to each other in header.

    So far:

    <?php
    if ( is_user_logged_in() ) {
         global $current_user;
            get_currentuserinfo();    
            echo get_avatar( $current_user->ID, 64 );
    } else {
        echo 'Welcome, visitor!';
    }
    ?>

    also would be cool if some one could point me in the the right direction for displaying avatar, users name, users bio and cover image so I can create a widget for logged in users too!

    Would be awesome!

    thanks in advance.

Viewing 1 replies (of 1 total)

  • jameshh93
    Participant

    @jameshh93

    Okay I managed to find a way! 🙂

    But does anyone still know how to echo out the cover image, a xprofile field and maybe even a link to the logged in users friends with or without friend count? thanks

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar