Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to access Buddypress avatar not on profile page

  • Hi I am developing a new site for a client. I’m trying to crate a sidebar for logged in users with their avatar, username, notifications and the Buddypress pages. I’m trying to add the avatar with the code below:

    <?php
    $userid = bp_loggedin_user_id();
    $avatarurl = bp_core_fetch_avatar( array( ‘item_id’ => $userid, ‘html’ => false ) );
    echo $avatarurl;
    ?>

    This works on Buddypress profile page but no other page, is there anything I need to include in the header. This is a personal theme not the Buddypress defult.

    Thanks for your help
    Conor

  • The topic ‘How to access Buddypress avatar not on profile page’ is closed to new replies.
Skip to toolbar