Hide Admin
-
Is there an obvious way to hide the Admin user from Buddypress (members, etc.)?
-
I’ve renamed my admin account to get around this. However, i’d like to get a way of hiding the bbpress forum user account for the user listing on the home page. Andy could we get a filter added in for this?
Bumping this because I’m curious about the same thing DJPaul mentioned. The need to create a random account for bbPress is fine, but it’s pointless having it listed with the BuddyPress members when it’s not really one.
Any suggestions?
There’s something like this in the works, but it won’t be available for a few months yet.
Any update on this?
I noticed this topic is marked as resolved. How can I enable this?
Still curious about this one. Can we hide the Admin throughout BuddyPress activity sitewide?
I’m not sure if it hides activity, but I heard a trick to “hiding” admins from the member list was to change their status in the database of the user to “99” and that prevents it from showing in the member’s list.
@DJPaul Any activity that the Admin carries out in my opinion should be hidden. Starting a Group, a forum topic, etc. In my case I am creating a number of groups for members to join and I’d like to hide all of that activity.
Saw that one…premium.
@scotm – if you read the end of that post, there’s a free solution noted by Brajesh.
Tried it, errors.
The snippet only works on WPMU.
If you’re using standard WP, replace is_site_admin() with if(current_user_can(‘manage_options’)) (thanks Brajesh).
Also, you could try adding the function in your theme’s functions.php (omit the add_action line).
hi @r-a-y is_site_admin() and is_admin() are very different. is_admin() checks whether you are inside wordpress admin or not.
@scotm
How about making the activity of admin user private
`add_filter(“bp_activity_hide_sitewide_before_save”,”make_admin_activity_private”,10,2);
function make_admin_activity_private($hide_sitewide,$activity){
//get the current activity
if(current_user_can(‘manage_options’))//user is admin
return 1;
else
return $hide_sitewide;}
`
Hopefully the code goes through this forum.Hey @sbrajesh, you’re right! Sorry about that! Was thinking off the top
BP 1.2.3 does provide is_site_admin() in the compat file, FWIW.
@sbrajesh I’m going to try that…Thanks
Yes, you’re right Paul!
No luck with that code to hide Admin activity. Can you pastebin to make sure I have it clean?
Just caught wind of this plugin to hide admin activity: https://wordpress.org/extend/plugins/bp-ninja/
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’.)
Has anyone come up with a clean solution to this one yet? Looking to hide all Admin activity on a BP install.
Thx
Any new update on this one?
- The topic ‘Hide Admin’ is closed to new replies.