Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] bp_has_members( ‘user_id=’ not returning all friends

@catchthepigeon

Participant

Right fantastic, so if ( bp_has_members( 'include=4112,1543,119' ) ) : returns the 3 correct members.

So the way round it was a mixture of the two things I tried… Being the end of the day – particularly monday I just completely missed it!

Instead of holding the values as an array you need to implode the list to follow the 'include= not the array(‘include’ => $matches)

SOLUTION

$MemImploded = implode(', ', $matches);
 if ( bp_has_members( 'include=' . $MemImploded ) ) :
    while ( bp_members() ) : bp_the_member();

Thanks very much to @shanebp for your help with this.

Skip to toolbar