REMOVE THE WORDPRESS ADMIN BAR IN YOUR THEME

I don’t know who decided to include the admin bar by default in your theme/front end when logged in to WordPress, but I find it really irritating when laying out a new theme.

I just want to see how my theme looks and behaves! The admin bar means you worry if anything will be affected when logged out.

If you’re like me and want to remove the, the code below seems to work. Just add it to the top of your theme’s functions.php file.

add_filter('show_admin_bar', '__return_false');

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">