Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide groups that you are a member of


  • ishraffi
    Participant

    @ishraffi

    HI,

    I need to hide the list of groups that the user is already a member of. How could you do this? I have used the following code to show only the list of groups that a user has joined:

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

    Which works fine

    But now I need the opposite: i.e. display the groups that a user is NOT a member of ( groups that are available for a user to join). I placed a != sign in the above code but unfortunately it didn’t work

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

    Thanks

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