WordPress.org

Forums

Hiding admin bar in 3.4 (9 posts)

  1. oomskaap
    Member
    Posted 2 years ago #

    No plugins can manage to pull it off (plugins that did it in 3.2). Some make it disappear, but leaving a 30px white space floating on top where the admin bar use to be. If anyone manage to get rid of it, please tell me how.

  2. ClaytonJames
    Member
    Posted 2 years ago #

    This is still working well for me on 3.4. Completely removes the admin bar from the front end, and no spaces left at the top of any of the sites I use it on. Disable Admin Bar

  3. oomskaap
    Member
    Posted 2 years ago #

    I see it works for the front-end. I would like it to be on the back-end as well.

  4. s_ha_dum
    Member
    Posted 2 years ago #

    There is padding on #wpcontent that creates a space for the admin bar. Add some admin css to remove that padding.

  5. PressTrends
    Member
    Posted 2 years ago #

    This may only work for version 3.1, I haven't tested it for 3.4 yet. Just add this snippet to your functions.php file and it should remove the admin bar globally.

    remove_action('init', 'wp_admin_bar_init');

    Hope this helps!

  6. oomskaap
    Member
    Posted 2 years ago #

    @s_ha_dum (was apljdi) Thanks, i just added #wpcontent{height:100%; margin-top:-28px;} to the wp-admin.css file. It works now

  7. s_ha_dum
    Member
    Posted 2 years ago #

    That will be overwritten next time you update. Be aware.

  8. lunchgirl
    Member
    Posted 2 years ago #

    What about removing it in front office only? through CSS?

    I'm using a child theme so updates don't bother me.

    Nofyah

  9. Thomas Maier
    Member
    Posted 2 years ago #

    for everyone not being able to kill the 28px empty space after disabling the admin bar at the top of the frontend. add this to functions.php

    (tested in WP 3.5.1)

    function remove_admin_bar_space () {
        remove_action( 'wp_head', '_admin_bar_bump_cb' );
    }
    add_action( 'admin_bar_init', 'remove_admin_bar_space' );

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.