How to hide the admin bar at the top of every wordpress user when they logged in.
WordPress automatically injects an admin toolbar at the top of the page for logged in users. This bar is really an annoyance to me because it slightly throws off my theme design and I never the toolbar for anything. Here's a snippet of code which will prevent that toolbar from displaying:
add_filter('show_admin_bar', '__return_false');
Now I don't need to hide this toolbar with CSS and my layout can look as it should. I love WordPress' filtering/hook system!
Hide the Admin Bar in Wordpress
Reviewed by MCH
on
May 13, 2014
Rating:
No comments: