Skip to:
Content
Pages
Categories
Search
Top
Bottom

show user avatar


  • Arturo
    Participant

    @arturo84

    hi, i need the function to show the user’s avatar on the forum sidebar, anyone can help me?

    thanks

    edit: i’ve tested this

    <?php echo bb_get_avatar($user->ID, 40, $default); ?>

    but i see a generic avatar and not my gravatar… help me!

Viewing 5 replies - 1 through 5 (of 5 total)

  • Rich Pedley
    Member

    @rich-pedley

    what value are you using for $default? have you tried just using:

    <?php echo bb_get_avatar($user->ID, 40); ?>


    Arturo
    Participant

    @arturo84

    yes but i see my avatar only on my profile page, in home, topic, etc i see a generic avatar…


    Rich Pedley
    Member

    @rich-pedley

    I’m coming to grips with bbPress.. slowly.

    Is the $user->ID actually availabel for use at that point or do you need to do a

    bb_get_current_user_info('ID'); ?


    Arturo
    Participant

    @arturo84

    you rocks Rick :)

    this is the solution:

    <?php echo bb_get_avatar(bb_get_current_user_info(‘ID’), 40); ?>


    Rich Pedley
    Member

    @rich-pedley

    glad it worked.

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