WordPress is really great thing, you will probably agree. It is free, open source and very fun to work with. Unfortunately there are times when WordPress guys go overboard with their logo and website links. It is a fine logo I really like looking at it but they don't really need to slap it all over the interface cause we're all aware that we're using WordPress (and we're loving it). Because of all that I'm bringing you little plugin I use here at TechyTalk.info to remove logo and associated menu with links from WordPress admin bar by default present for all logged in users.
First lets start with the code it self. I'll paste my plugin snippet here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <?php /* Plugin Name: Admin Bar WP Logo Menu Remover Plugin URI: http://www.techytalk.info Description: Removes logo and menu from WordPress admin bar. Author: Marko Martinović Version: 1.00 Author URI: http://www.techytalk.info License: GPL2 */ function abwlmr_remove_wp_logo() { global $wp_admin_bar; $wp_admin_bar->remove_menu('wp-logo'); } add_action( 'wp_before_admin_bar_render', 'abwlmr_remove_wp_logo' ); ?> |
You can paste this PHP code inside for example admin-bar-wp-logo-menu-remover.php
file and place it inside your wp-content/plugins/
directory. Now just go to your site plugin list and enable this puppy and WordPress logo and menu is removed from your WordPress admin bar.
Actually you can use same code to remove all other stuff from admin bar you just need to replace 'wp-logo' with ID of menu you wish to remove. For example to remove site name menu you use 'site-name' menu ID, new content menu 'new-content' menu ID, comment bubble 'comments' menu ID, right side user menu 'my-account' menu ID. For more IDs consult your wp-includes/admin-bar.php
. Have fun!
worked for me thanks 🙂
Perfeito, muito obrigado
usei no arquivo functions.php
Worked, thanks 🙂