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 default. I’m using WordPress 3.8.1 and Buddypress 1.9.2. The site is beta.hyperjake.com
Thanks for your help
Conor
- The topic ‘How to access Buddypress avatar not on profile page’ is closed to new replies.