Hide the WordPress Admin Bar in WordPress 3.1

The quick answer:
<?php show_admin_bar(false); ?>

All the Info:
WordPress 3.1 has been released.  WPCandy tells you what’s new and exciting.

One of the features is a new admin bar that sits at the top of the page and provides logged in admins quick access to their profile, adding a new post or page, comments, widgets, and menus.  This is a great new feature — most of the time — but sometimes it will break on sites with incompatible themes.

How do you turn off the WordPress Admin bar?

The easiest way is to update the functions.php file for your theme and include the following function call.

Add to functions.php:
<?php show_admin_bar(false); ?>

View documentation for show_admin_bar() or the show_admin_bar filter.

By Calvin Freitas

I am a Senior Front-End Engineer in the Seattle area. I'm the creator of the Verses for Life website and app. I'm an Amazon veteran and currently living the startup life.