Skip to:
Content
Pages
Categories
Search
Top
Bottom

Help : Friends online widget

  • Avatar of gwu123
    gwu123
    Participant

    @gwu123

    Hi Guys,

    I have modified the “Who’s Online avatar” widget to “Friends Online avatar” using the code below. This works fine for all users except the admin. For admin all the users are listed. Any idea wats worng.

    <?php if ( bp_has_members( ‘user_id=’ . bp_loggedin_user_id() . ‘&type=online&per_page=’ . $instance['max_members'] . ‘&max=’ . $instance['max_members'] . ‘&populate_extras=0′ ) ) : ?>

    <div class=”avatar-block”>

    <?php while ( bp_members() ) : bp_the_member(); ?>

    <div class=”item-avatar”>

    ” title=”<?php bp_member_name() ?>” alt=”<?php bp_member_name() ?>”><?php bp_member_avatar() ?>

    </div>

    <?php endwhile; ?>

    </div>

    <?php else: ?>

    <div class=”widget-error”>

    <?php _e( ‘There are no users currently online’, ‘buddypress’ ) ?>

    </div>

    <?php endif; ?>

    Thanks

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

You must be logged in to reply to this topic.