Skip to:
Content
Pages
Categories
Search
Top
Bottom

Logged-in User’s Gravatar to show on header.

  • Whats the function or how do I show the logged in user’s gravatar or uploaded avatar on the header, after they’ve logged in.

    thanks..

    i promise to relase the theme im making the general public.

Viewing 10 replies - 1 through 10 (of 10 total)
  • For Gravatars:

    echo bb_get_avatar( bb_get_current_user_info( ‘id’ ), 32 )

    Where 32 is the pixel size of the Gravatar.

    (That’s 1.0 code… not sure about 0.9.)

    Many thanks timskii!

    Ranked 100% on the Awesomage meter!

    fixed.. img.avatar { border: 0px solid #ddd; }


    kwk
    Participant

    @kwakok

    Please, how did you use the code <<echo bb_get_avatar( bb_get_current_user_info( ‘id’ ), 32 )>> to display the avatar or gravatar of the logged-in user in the header. Any explanation on what to do?


    Robin W
    Moderator

    @robin-w

    This code is from version 1 of bbpress, so probably no longer works.


    kwk
    Participant

    @kwakok

    Please, could you suggest any other solution?


    Robin W
    Moderator

    @robin-w

    depends on what you mean by ‘solution’ 🙂

    get_avatar( wp_get_current_user(), 32 );


    Robin W
    Moderator

    @robin-w

    so where do you want to put this ?


    kwk
    Participant

    @kwakok

    I’m new to coding and do not know much about these things. I would like the avatar or gravatar to show on the right corner of my header.
    First of all, do I need to put this code <<get_avatar( wp_get_current_user(), 32 );>> in my header.php file?
    And do I need to write some CSS code to style it?


    Robin W
    Moderator

    @robin-w

    ok, so that is going to be hard to answer as your site is unique to you, and this is theme and setting dependant.

    a bit like me asking you where the best place in my bathroom to put the towel rail, and how to install it when I don’t know what a drill is 🙂

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