Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So I've tried like three different solutions:

    remove_action('init', 'wp_admin_bar_init');
    add_filter( 'show_admin_bar', '__return_false' );

    function remove_admin_bar_css() {
        show_admin_bar( false );
        remove_action('wp_head', '_admin_bar_bump_cb');
    }

    add_action('admin_bar_init', 'remove_admin_bar_css');

However, the admin bar is still there. I'm a WP beginner. Maybe I'm misunderstanding what the admin bar is? Is this it? http://wpmu.org/wp-content/uploads/2010/09/wordpress-admin-bar.jpg ? The black bar on the top?

I'm sure I am editing the right functions file too, since I just echo 'hello'ed and it showed up. However, the black bar on the top (the thing I want to remove) is not disappearing. I am using WP 3.5.2, upgrading from 3.2.1.

share|improve this question
    
Do you mean in frontend and/or admin? There several question about this on site, please look at them. –  Rarst Jun 27 '13 at 22:30

3 Answers 3

there is a way...

Add this to your functions.php page:

add_action('set_current_user', 'cc_hide_admin_bar');

function cc_hide_admin_bar() {
if (!current_user_can('edit_posts')) {
    show_admin_bar(false);
    }
}

What this does, is simply removes the admin bar for anyone that isn't able to edit posts (contributors for example). For anyone else, it is shown...

Hope that helps!

share|improve this answer

A plugin may help you then:

share|improve this answer

I'm not sure why you wish to remove the admin bar, but you can also simply add the following to your style.css file to override the display of the admin bar:

#wpadminbar { display:none; }

share|improve this answer
2  
this will hide the admin bar, but leave an empty gap at the top of the page. –  Milo Jun 27 '13 at 20:37
    
add_filter('show_admin_bar', '__return_false'); This alone works fine for me. Did you include it in your functions.php? –  tnog Jun 27 '13 at 20:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.