Support » Fixing WordPress » Remove admin_bar?

  • Andrew

    (@ndrwglrzayahoocom)


    Hello.

    Is there anyway to remove the admin bar completely? It’s taking space on my page even though it’s not showing.

    I guess it shows because of wp_head. is there anyway to prevent wp_head from adding it at all, instead of just hiding it?

    Please help.

    Thank you,

    Andrew

Viewing 5 replies - 1 through 5 (of 5 total)
  • You can remove the admin bar via your profile settings in the backend or you can add the following code to your functions.php.

    /*
     * Remove the admin bar and admin bar settings
     */
    add_action( 'init', 'disable_admin_bar' , 9 );
    function disable_admin_bar() {
    	// Hide Admin Bar
        add_filter( 'show_admin_bar', '__return_false' );
        add_action( 'admin_print_scripts-profile.php',
             'hide_admin_bar_settings' );
    }
    Andrew

    (@ndrwglrzayahoocom)

    Okay, never mind. I seem to have figured it out. I had it set to show on the dashboard.. But it wasn’t showing anyway? Just the space for it was apparent.

    Anyway, I got it hidden now.

    Thank you,

    Andrew

    Andrew

    (@ndrwglrzayahoocom)

    Okay, thank you, w1nk5.

    Does this remove the code or hide it? Some people said that the code still takes up memory if you just hide it.

    Please help.

    Thank you,

    Andrew

    The code above will stop the admin bar from loading when WordPress is initializing.

    Andrew

    (@ndrwglrzayahoocom)

    Okay, thank you.

    :Dd

    -Andrew

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove admin_bar?’ is closed to new replies.