1

I'm following the instructions from this page to remove the adminbar wordpress logo and cannot quite understand why this is not working in a plugin I have created.

// Hide top left WordPress logo

add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );

function remove_wp_logo( $wp_admin_bar ) {
    $wp_admin_bar->remove_node( 'wp-logo' );
}

Everything else in my plugin is working except this. Only difference I see in that example is that it is referring to the functions.php file?

Any thoughts would be appreciated?

1
  • Where in the plugin file are you using this function? Commented Nov 22, 2013 at 9:00

2 Answers 2

4

This one does the job for us, we use WP3.7.1.

function no_wp_logo_admin_bar_remove() {
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu('wp-logo');
}
add_action('wp_before_admin_bar_render', 'no_wp_logo_admin_bar_remove', 0);
1
  • Many thanks Charles that did the trick. Much appreciated Commented Nov 25, 2013 at 14:41
0

Have a look to the below link: http://codex.wordpress.org/Plugin_API/Action_Reference/wp_before_admin_bar_render

2
  • 3
    Lone link is considered a poor answer see (help > deleted answers) since it is meaningless by itself and target resource is not guaranteed to be alive in the future. Please try to include at least summary of information you are linking to.
    – Rarst
    Commented Nov 22, 2013 at 10:24
  • Thanks Manish, I had a read through it and understand it a little better now. Commented Nov 25, 2013 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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