This is a widget
https://wordpress.org/extend/plugins/bp-show-friends/
I haven’t used this and don’t know if it’s compatible with BP 1.5 as is.
If you don’t want a widget and don’t know how to write your own query, you could do something like this – untested by me:
<?php
$user_id = $bp->loggedin_user->id;
$args = 'user_id='.$user_id.'&per_page=10&populate_extras=0';
if ( bp_has_members( $args ) ){
?>
<div class="item-avatar">
<a href=""></a>
</div>
<?php
}
else echo 'You have no friends!';
?>
I believe, that if you pass user_id to bp_has_members loop, it only returns the friends of that user_id.
@shaneBP
Thanks shane, it worked. Is there a way to use the larger user avatar rather than the smaller one? Thanks
Probably :
bp_member_avatar(‘type=full’)
@shaneBP, is there a way the code can also display names in front of the Avatar. i mean something like facebook?
thank you