-
Author
-
April 4, 2014 at 15:54 #14328gsxawd99Participant
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
April 4, 2014 at 16:27 #14332sharmstrModeratorThis 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 CODEgroups_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 solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The topic ‘Hide a group admin or moderator?’ is closed to new replies.