This topic has 2 replies, 2 voices, and was last updated 10 years by gsxawd99.

  • Author
  • #14328
     gsxawd99
    Participant

    Is there a way for me to hide a group admin or even moderator from appearing on the group page? I am using a group as a free agent signup group for a baseball league but I need team managers to be part of the group as admins of the group so they have the ability to remove someone from the group once they sign them to their team,this was other managers aren’t calling the same player who is already taken. Currently the managers all show up on the group page and I can’t have that. Any help would be great. thanks

    #14332
     sharmstr
    Moderator

    This is a more of a BuddyPress question. You should post this over at http://buddypress.org/support/.

    With that said, there’s code that excludes members from the directory by role here: https://gist.github.com/dzmounir/8285459

    You could possibly make that work in groups, the difference being is that you wouldn’t look up the users role for the site, but the “is_admin” and “is_mod” in the ‘bp_groups_members` table. Clues on how to do that can be found here: /plugins/buddypress/bp-group/bp-groups-classes.php

    OR

    You might be able to exclude them in /kelo/buddypress/groups/single/members.php. The looping of members starts around line 33. In the beginning of that loop, you might be able to determine if they are an admin or mod with these

    COPY CODE
    
    
    groups_is_user_mod( bp_get_member_user_id(), bp_the_group() )
    groups_is_user_admin( bp_get_member_user_id(), bp_the_group() )
    

    Just make sure you copy members.php to your child theme.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #14334
     gsxawd99
    Participant

    thank you very much for your help, i will play around with it. very appreciated.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Hide a group admin or moderator?’ is closed to new replies.

Log in with your credentials

Forgot your details?