[wp-hackers] Removing Admin Toolbar from Front-End

Mika A. Epstein ipstenu at ipstenu.org
Tue Dec 20 17:46:00 UTC 2011


Put this in your THEME'S function.php (not in a plugin file).

add_filter('show_admin_bar', '__return_false');

On 20.12.2011 11:42, Robert Lusby wrote:
> In WP 3.3, everyone is saying you *can* remove the new admin toolbar
> from the frontend, but not from the backend.
>
> Fair enough - I understand why this is, and the story behind it, and
> how it's different from 3.2.
>
> But how do I actually remove the dam thing from the front end?
>
> If a user has it set on in their profile, it hard codes a 28px CSS
> margin in the top of my site!
>
> Can someone provide me the magic function that disables this on the
> front-end for everyone please?
>
> [Not the "login to your account, and uncheck the box method" - can
> you imagine having to do that for every user!!]
>
> Thanks loads in advance,
> Robert
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

-- 
Mika A Epstein (aka Ipstenu)
http://ipstenu.org


More information about the wp-hackers mailing list