Skip to:
Content
Pages
Categories
Search
Top
Bottom

Using posts2posts parameters with bp_has_members()


  • enderpal444
    Participant

    @enderpal444

    I’m using the posts2posts plugin to create relationships between users but bp_has_members() isn’t taking it’s custom parameters. Instead I get a list of all users so how do I make this work together? Here’s my loop…

    
    $followed_user = $bp->displayed_user->id;
    $number = 25;
    $args = array(
    'connected_type' => 'user_followers',
    'connected_items' => $followed_user,
    'suppress_filters' => false,
    'per_page' => $number
    );
    if ( bp_has_members($args) ) :
    echo '<ul>';
    while ( bp_members() ) : bp_the_member();
    echo '<li>'; ?>
    <a href=&quot;">
    <?php bp_member_avatar();
    bp_member_name();
    echo '</a></li>';
    endwhile;
    echo '</ul>';
    endif;
    echo '<div class="infinitescroll">';
    bp_members_pagination_links();
    echo '</div>';
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using posts2posts parameters with bp_has_members()’ is closed to new replies.
Skip to toolbar