Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Restrict access to wp-admin and disable admin bar for forum participants

@p3t3rr

Participant

not sure why you need the second bit of code?

I thought it’s necessary to in case subsribers have the link ‘mysite.com/wp-admin’. However, I just commented the second function out and it seems a subsriber still does not have access to /wp-admin.

So, I guess

function disable_admin_bar() {
	if (current_user_can( 'subscriber' ) ) {
		show_admin_bar( false );
	}
}
add_action( 'after_setup_theme', 'disable_admin_bar' );

takes care of both (and second function is obsolete)?

Skip to toolbar