Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to exclude groups that you are already a member of


  • ishraffi
    Participant

    @ishraffi

    I am running a buddypress site based on wild-community theme. I used the following code to display only the groups that a logged in user has joined:

    <?php if ( bp_has_groups( ‘type=alphabetical&user_id=’ . $bp->loggedin_user->id )&& is_user_logged_in()) : ?>

    This works perfectly fine. However Now I also need to list down only the groups that the loggedin user is NOT a member of, I used the != to sign in several ways but nothing worked:

    <?php if ( bp_has_groups( ‘type=alphabetical&user_id!=’ . $bp->loggedin_user->id )&& is_user_logged_in()) : ?>

    PLEASE HELP!!

  • The topic ‘How to exclude groups that you are already a member of’ is closed to new replies.
Skip to toolbar