Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

  • @massbase

    Member

    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)
  • @timskii

    Member

    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.)

    @massbase

    Member

    Many thanks timskii!

    Ranked 100% on the Awesomage meter!

    @massbase

    Member

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

    @kwakok

    Participant

    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

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

    @kwakok

    Participant

    Please, could you suggest any other solution?

    @robin-w

    Moderator

    depends on what you mean by ‘solution’ 🙂

    get_avatar( wp_get_current_user(), 32 );

    @robin-w

    Moderator

    so where do you want to put this ?

    @kwakok

    Participant

    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

    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