Remove WordPress Admin Bar
October 23, 2015 / by Peter Johnson / Categories : Keeping A Clear Head, SnippetsSometimes it is needed to remove the Admin bar at the top of each page when you are logged in to WordPress.
Examples
- A user / subscriber is logged in.
- While theming to see content at the top of the page.
- Its a pain in the A**.
To do this we can add a snippet to the Functions.php file.
For all users:
show_admin_bar(false);
For all users EXCEPT the Admin
if (!current_user_can('administrator')): show_admin_bar(false); endif;
0 comments