Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Hide Admin


Mark
Participant

@codeispoetry

Socialpreneur has a nice snippet here that makes it easy to hide the admin from the members list assuming you know the admin’s login name.

Place this in your bp-custom.php:


function my_bp_member_user_login() {
echo my_bp_get_member_user_login();
}
function my_bp_get_member_user_login() {
global $members_template;
return apply_filters( 'my_bp_get_member_user_login', $members_template->member->user_login );
}

Then in your members-loop.php file, place this just below the while statement (wrapped in php tags!):
if ( my_bp_get_member_user_login() == 'admin' ) continue ;

(Supposing your admin’s login is ‘admin’.)

Skip to toolbar