Reply To: Hide WordPress User Bar When Logged In
I dont get this logic, despite if it is only WP logic, not bbPress one.
Maybe I missunderstool it all. New Users (Roles = Subscriber, Participant) have access to add new Posts, and attach them to taxonomies.
Forum Users are forum USers, not Portal editors of Articles.
This code should be in bbPress core. When you install bbPress you accept that whole platform is changed to something else, and old WP rules are not valid anymore.
For all other things Users have buddyPress profile Pages.
function splen_remove_admin_bar() {
if( !is_super_admin() )
add_filter( 'show_admin_bar', '__return_false' );
}
add_action('wp', 'splen_remove_admin_bar');
//don't allow users to go wp-admin
add_action( 'init', 'blockusers_init' );
function blockusers_init() {
if ( is_admin() && ! current_user_can( 'administrator' ) &&
! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}