BuddyBoss Home – Web › Support Forums › Solutions › Social Learner › How do I hide Admins from the Members list?
Tagged: Hide Members
- This topic has 3 replies, 3 contibutors, and was last updated 8 years, 9 months ago by Anonymous.
Question
January 31, 2016 at 4:00 am #57699@infoteamI want to hide all admins from the Members list because I have special users set up to admin the site but should not be seen by other users.
How is this accomplished with the Social Learner/BuddyPress setup?
Thanks,L
EllenAnswers
February 1, 2016 at 1:29 pm #57844@
AnonymousHi @infoteam
Please take a look of following thread, hopefully it will solve what exactly you are looking forhttps://buddypress.org/support/topic/hide-admin-from-members-and-activity/
Regards
Varun DubeyFebruary 1, 2016 at 1:56 pm #57854@infoteamThanks! I tried searching here for various combinations of “hide admins”, but never found that page. I should be able to sort it out from there.
Cheers!
EllenFebruary 3, 2016 at 12:45 am #57962@
AnonymousHi @infoteam, add this function in your theme’s function.php
add_action('bp_ajax_querystring','buddyboss_exclude_users',20,2); function buddyboss_exclude_users($qs=false,$object=false){ //list of users to exclude $excluded_user='1,2,3';//comma separated ids of users whom you want to exclude if($object!='members')//hide for members only return $qs; $args=wp_parse_args($qs); //check if we are searching for friends list etc?, do not exclude in this case if(!empty($args['user_id'])||!empty($args['search_terms'])) return $qs; if(!empty($args['exclude'])) $args['exclude']=$args['exclude'].','.$excluded_user; else $args['exclude']=$excluded_user; $qs=build_query($args); return $qs; }
Regards
- The question ‘How do I hide Admins from the Members list?’ is closed to new replies.