How to remove WordPress 3.3 Admin Toolbar in front end?

Not many like the admin bar at the top provided by WordPress. Even though in WordPress 3.3, admin bar being called toolbar is much better, viewing my website as a user, the toolbar adds some unneeded options and it doesn’t fit into the site in terms of look and feel. I do not mind the admin bar at the back-end especially for one reason – I use W3C total cache and the ‘Empty All Caches’ option is the only reason I have the toolbar at the back-end.

So how do we remove the toolbar only in the front end? There are lots of plugins available which can do this along with other options. But a simple and easy solution to remove it, is by using a wordpress function ‘show_admin_bar’.

We can call this function in the theme’s ‘functions.php’ file. Write the following line of code inside the php tags (<?php ?>)

show_admin_bar( false );

That’s it. On next refresh, the toolbar will not there in the front end of your site.

Leave a Comment