Multisite Privacy Plugin Not Working Correctly

When a Subscriber user logs in, the admin bar is displayed across the top. Why is that? Users who have non-editing or admin roles should not see the admin bar with the Multisite Privacy plugin enabled and configured. Am I doing something wrong or is this a limitation of the plugin?

  • Nithin

    Hi Kevin,

    Hope you are doing good today. :slight_smile:

    The plugin is only related to providing network wide privacy options, I'm afraid, there isn't any out of the box settings available to hide the default admin bar feature. If you are looking to hide anything specific in admin bar, you could make use of the Ultimate Branding plugins Custom Admin bar module.

    Once enabled, you can customized the admin bar, or hide menus according to user roles. I hope this helps. Please let us know if you still need any further assistance. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Kevin

    Hummm. So, I was informed that the Multi-site Privacy plugin is used to create an "intranet" site or sites for a multi-site instance of WP. And it looks like I can set one or more sites (but not all) to require a login to view the site. That appears to be working fine. I would like to suggest what should be a very simple improvement for your developers: hide the admin bar if the user logging in is NOT an admin. Does that sound reasonable? When you do think that update could be added? Would love to see that feature. (We don't want to hide parts of the admin bar, but the whole thing, so the Ultimate Branding plugin would not help.)
    Thanks,
    Kevin

  • Nithin

    Hi Kevin,

    This plugin is all about providing different levels of privacy by limiting access to the users. If you are looking to hide the admin bar as a whole, you can add the following CSS in the Admin Bar CSS Styles in the the Ultimate Branding plugin as mentioned above:

    #wpadminbar {
        display: none;
    }

    You can also select the user roles on which this CSS would affect. I'm not sure how much use the disable admin bar option would be for users, if you are still looking to see this option in the plugin, I could move this thread to the Features & Feedback section, so that more users liking this idea, the more it'll be considered. Please let us know how you want, have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Nithin

    Hi Kevin,

    Hope you are doing good today. :slight_smile:

    I stand corrected, sorry about the previous statement, there isn't any out of the box setting available to apply custom CSS for subscribers in the plugin. You could try adding the following code in your themes functions.php file to hide adminbar specific to subscriber:

    function wp_remove_subscriber_adminbar( $classes ) {
       global $current_user;
    
    if(in_array('subscriber', $current_user->roles)) {
    	echo "<style>
    		#wpadminbar {
    			display: none;
    		}
    
    		html.wp-toolbar {
    			padding-top: 0 !important;
    
    		}
    	</style>";
    
    }
    
    }
    add_action( 'admin_head', 'wp_remove_subscriber_adminbar' );
    add_action( 'wp_head', 'wp_remove_subscriber_adminbar' );

    However, with the above code, the user won't be able to see any logout link in the dashboard, if you hide the admin bar fully. You could make use of a plugin like Adminimize to hide the admin bar, once activated under Settings > Adminimize > Global options you can hide the adminbar specific to user roles.
    https://wordpress.org/plugins/adminimize/

    I'm moving this thread to Features & Feedback section , so that more members +1 this thread, the more this feature will be considered for development. Have a great year ahead. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.