Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

Hide Admin User

This topic is resolved
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Werner
    Participant
    • 37 Topics
    • 97 Posts
    @creation

    Hi there,

    I do not want to show up as a registered user in the Members-List.
    How can I avoid that (make myself invisible)?

    Thanks for your help.

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Hi @creation,

    There is no option in BuddyPress to hide admin users, but you can resolve this issue by using the following plugin that was kindly shared by a member of our community @abourne 🙂

    BP Custom Functionalities

    That plugin has an option to hide members from the member directory by their role, which means you can use it to hide all admin users from the directory.

    Hope this helps you resolve your issue.

    Regards

    Werner
    Participant
    • 37 Topics
    • 97 Posts
    @creation
    This reply has been marked as private.
    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    Ok, it looks like this plugin unfortunately has some issue, so we advise that you uninstall it.

    Could you try using the following PHP code snippet instead:

    // Remove admin from the member directory
    function gwangi_hide_admins( $qs = false, $object = false ) {
    
    	$excluded_user = implode( ',', get_users( 'role=administrator&fields=ID' ) );
    
    	if ( $object != 'members' && $object != 'friends' ) // hide admin to members & friends
    		return $qs;
    
    	$args = wp_parse_args( $qs );
    
    	if( ! empty( $args['user_id'] ) )
    		return $qs;
    
    	if( ! empty( $args['exclude'] ) )
    		$args['exclude'] = $args['exclude'] . ',' . $excluded_user;
    	else
    		$args['exclude'] = $excluded_user;
    
    	$qs = build_query( $args );
    
    	return $qs;
    
    }
    add_action( 'bp_ajax_querystring', 'gwangi_hide_admins', 20, 2 );

    To find out how to add a PHP code snippet to your website, we advise that you take a look at this article of our documentation:

    Adding Custom PHP Without Changing Your Child Theme

    Regards

    Werner
    Participant
    • 37 Topics
    • 97 Posts
    @creation

    It worked!
    Thanks a lot!!!!

    Themosaurus
    Keymaster
    Themosaurus Support
    • 1 Topics
    • 1675 Posts
    @themosaurus

    You’re welcome. ?

    Best regards,

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Hide Admin User’ is closed to new replies.

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site