WordPress 3.1 Very Slow? Disable The Admin Bar [Quick Tip]

Ever since I upgraded to WordPress 3.1, I found that getting around in the admin area becomes very slow. Typing a post in the text editor is extremely laggy and becoming more of a nightmare. Apparently. this was due to the admin bar taking up the system resource. One good way is to disable it for good.

Here’s how you can disable the admin bar:

Open the functions.php file in your theme.

Paste the following code at the end of the file:

function hide_admin_bar_settings() {
?>
	<style type="text/css">
		.show-admin-bar {display: none;}
	</style>
<?php
}
 
function disable_admin_bar() {
    add_filter( 'show_admin_bar', '__return_false' );
    add_action( 'admin_print_scripts-profile.php', 'hide_admin_bar_settings' );
}
add_action( 'init', 'disable_admin_bar' , 9 );

Save and replace the file in the server. That’s it. You should have a more responsive Admin Dashboard now.

  • http://www.wouldyoukindly.com Wouldyoukindly

    This actually did help speed up the dashboard quite a bit. Thanks!

  • Anonymous

    I had been using only the return false statement and it works. What would be the reason to add the additional css?