Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: adding avatar & name to blogs


Andy Peatling
Keymaster

@apeatling

I’d like to build a widget for this, but for now you can do this in the sidebar:

<div id="profile-badges">
<?php
$users = get_users_of_blog( $current_blog->blog_id );

foreach ( $users as $user ) {
$user = new BP_Core_User( $user->user_id );
?>
<div class="profile-badge-avatar"><?php echo $user->avatar_thumb ?></div>
<div class="profile-badge-name"><?php echo $user->user_link ?></div>
<div class="profile-badge-active"><?php echo $user->last_active ?></div>
<?php } ?>
</div>

That will print a profile badge for every user with privileges on a blog.

Skip to toolbar