Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding Admin from Members List

  • @eskymo

    Participant

    I just followed the suggestions in this post to remove Admin from the activity stream and the members list. However it’s not a complete solution.

    https://buddypress.org/support/topic/hide-admin-from-members-and-activity/

    Admin gets removed from the main page members list and activity stream, but I use a ‘members’ widget in my sidebar and the admin still shows up in that.

    How do I remove the admin from the sidebar widget as well?

Viewing 4 replies - 1 through 4 (of 4 total)
  • @henrywright

    Moderator

    This can be done with bp_parse_args(). See the Using bp_parse_args() to filter BuddyPress template loops article for a tutorial.

    @eskymo

    Participant

    Thanks for the link, but I’m not a WordPress or Buddypress coder, so it’s all a bit beyond me to be honest…

    @henrywright

    Moderator

    I think it’s pretty straightforward. Try this:

    function my_bp_members_loop( $retval ) {
        $retval['exclude'] = 1; // This needs to be the ID of your admin user.
        return $retval;
    }
    add_filter( 'bp_after_has_members_parse_args', 'my_bp_members_loop' );

    @eskymo

    Participant

    For you maybe – I’m treading water (just) in the deep end.

    Thanks for the code – I’ll give it a go.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hiding Admin from Members List’ is closed to new replies.
Skip to toolbar