Skip to:
Content
Pages
Categories
Search
Top
Bottom

Exclude members from the Members Loop?


  • katemgilbert
    Participant

    @katemgilbert

    I am using bp_has_members() to query a list of site members with avatars onto one page. I want to exclude a couple members by username or some other parameter, to hide the site developers who are not really members of the group itself. What can I add into the loop to exclude or hide certain members?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, I too want a solution for the same problem just like you. I want to hide admin and sitemanager from the members list. I was searching everywhere for it. If you know something about it just send a message to me to my profile. Waiting for your reply…..Plz….


    katemgilbert
    Participant

    @katemgilbert

    Hi Trivikrama – I have had no success yet in finding a solution. Message me yourself if you find something!


    r-a-y
    Keymaster

    @r-a-y

    Right now, there is no “exclude” parameter in bp_has_members().

    However you could filter certain members out with a little hackery. In the members loop, do a conditional to check the member’s username against something. If it matches, skip it.

    eg.
    if ( bp_get_member_user_login() == 'USERNAME_TO_CHECK' ) continue;

    This would go right after bp_the_member() in the loop.

    There is probably a better way, but for now try that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Exclude members from the Members Loop?’ is closed to new replies.
Skip to toolbar