The new version of WordPress is released some days back and it introduced some new features. This WordPress 3.1 introduces some new functionalities like easy interlinking, new admin color scheme, Admin bar, etc. Also some new features are added for developers, to further utilize the power of this CMS.
Some people may want to hide admin bar in WordPress. The solution is simple. Just follow below steps:
- Login to your Dashboard (wp-admin)
- Click on your username from the top right side of the screen
- As soon as you click on the name, you can see your profile. Now just uncheck “Show Admin bar” options like “when viewing site” and “in dashboard”. Refer below screenshot.
That’s done. You have successfully disabled the Admin bar in WordPress. Please note that with this method, the Admin bar will be disabled for only specific user and not for all users. You can also use a plugin to disable this for all the users.
Or alternatively, you can do this by adding a simple code in your functions.php file. Just scroll down and add this code, before closing PHP tag i.e. <?php
show_admin_bar(false);
This code will remove the Admin bar for all the users.
Note: If you are using this code, and if you ever change a theme, then you will need to add this code again in the new theme also. Also ensure that you take a backup of functions.php file before editing it, as just a precautionary measure.
Kate says
Your one-line PhP code needs a semi-colon! I.E. ‘ show_admin_bar(false);‘
Folk without code knowledge’ll just C/P that in there without realizing they need to end the line.
Thanks for this, though! :D
Saqib says
Thanks Kate for correcting me. It seems that I missed that semi-colon.
Edvard says
Great tip, thanks a lot! It works like a charm!
BR