Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide admins from group member list


  • allisonnance
    Participant

    @allisonnance

    I’ve been searching and trying many possible solutions for this but still haven’t found anything that works for me. Admins are showing up in the group member list. I need to hide them in the list but still allow their activity to show in the activity stream.

    I found the parameter exclude_admins_mods in the bp-groups-functions.php and it’s set to true but admins are still showing. I’m not experience with php so this is a trial and error thing.

Viewing 1 replies (of 1 total)

  • danbp
    Participant

    @danbp

    Hi @allisonnance,

    Use a child theme to do this.
    Copy member.php from bp-templates/bp-legacy/buddypress/groups/single/members.php
    to
    your-child/buddypress/groups/single/members.php

    Remove line 11

    <?php if ( bp_group_has_members( bp_ajax_querystring( 'group_members' ) ) ) : ?>

    and replace by this one:

    <?php if ( bp_group_has_members( 'exclude_admins_mods=1'. bp_ajax_querystring( 'group_members' ) ) ) : ?>

    Save. You’re done.

    If you want to remove also Group Admin and Mods from the group header, remove the whole div content of <div id=”item-actions”> in group-header.php, in same directory as above members.php
    Also to do from within child theme.

    Reference:

    Group Members Loop

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar