Disable WordPress administrator bar under 3.1 for all users


The 3.1 version of adds an administrator bar directly on the front end of your site. Although it can be disabled for each account, this tip will teach you how to delete it directly from functions..Disable WordPress administrator bar under 3.1 for all users

 

Go to the menu, then Appearance and then to Editor. In the right sided list, click the functions.php file.

However, we advise you to backup through an FTP client to easily a copy of the file. You might get a blank page after saving as a result of the placement error code snippet:

 

 

function my_function_admin_bar () {
return false;
}
add_filter (‘_admin_bar’, ‘my_function_admin_bar’);

 


Update: Many thanks to David of digitalraindrops for correcting the snippet.

 

So, just add these lines to the file – typically after a PHP function.

Otherwise, do not forget to frame tags <?php and ?> .

Remember to Update the file.

Go back to your site and verify that the administrator bar has disappeared. Also try a different user account to the actual change.

 

The admin bar introduced since version 3.1 of WordPress may yet prove useful to the novice user but useless in some cases specific use of the platform.

Signature


If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
About Abhishek

Abhishek Ghosh is an Orthopedic Surgeon, Inventor with 216 Patents, Current editor of The Customize Windows Media Group. You can follow and know more about Dr. +Abhishek Ghosh on Google Plus and follow on Twitter as @AbhishekCTRL.

Comments

  1. Hi Abhishek,

    Have the function the wrong way around, the word function should come before the function name fatal error:

    Switch it round and it works fine:

    function my_function_admin_bar () {
    return false;
    }
    add_filter (‘show_admin_bar’, ‘my_function_admin_bar’);

    David

Speak Your Mind

*