Try putting something like this in /plugins/bp-custom.php:
<?php
if ( is_user_logged_in() ) {
$user_roles = wp_get_current_user();
$user_roles = $user_roles->roles;
if ( empty( $user_roles ) || in_array( 'subscriber', $user_roles ) )
define( 'BP_DISABLE_ADMIN_BAR', true );
}
?>
Thanks!
I tried this and it gives me this error:
Fatal error: Call to undefined function is_user_logged_in() in /plugins/bp-custom.php on line 2
Any other suggestions?
is_user_logged_in() is present in both WP and WPMU. Odd. What versions of WordPress/WordPress MU are you using?
I’m using WPMU 2.9.2 and the latest version of Buddypress. I guess i’ll try using it in a fresh install, maybe someone on our staff edited something they shouldn’t and it’s causing this error…
Thanks
Same error on fresh install… Maybe i should just leave it there? or create a different bar that will load only for authors?