Forums
-
- Forum
- Posts
-
- Installation
- 28,531
- Troubleshooting
- 62,964
- Themes
- 10,453
- Plugins
- 15,408
- Requests & Feedback
- 15,048
- Showcase
- 3,252
-
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)?