removing wp toolbar / adminbar
-
Hi,
I’d like to remove the tool bar / admin bar for users who are not administrators and editors. It works well as long as user doesn’t access the page: http://www.mysite.com/wp-admin/profile.php
On this specific page, the toolbar is shown regardless of the below code:function disable_admin_bar() {
if (!current_user_can( ‘moderate_comments’ )) {
add_filter( ‘show_admin_bar’, ‘__return_false’ );
show_admin_bar(false);
}
}
add_action( ‘init’, ‘disable_admin_bar’ , 9 );If you could please advise with two questions:
1) How to remove the toolbar from http://www.mysite.com/wp-admin/profile.php ?
2) How to remove the left bar “dashboard” link ?
I’d like to keep only the profile.
Would be great to remove the whole left bar (Dashboard/Profile/Collapse) keeping only the profile screen in case user wants to change his profiles.Appreciate your guidance,
R.
The topic ‘removing wp toolbar / adminbar’ is closed to new replies.