How to Remove the WP Logo from the Admin Bar Menu
Md Abul Bashar | 2,519 views | December 21, 2015 | Tips And Tricks,WordPress | No | 11:29 PM |
Hello, Guys How are you? i think you’re all good with grate, today i will tech you How to Remove the WP Logo from the Admin Bar Menu. so i will go to the work.. just open your functions.php file in your theme folder then you can see at last code ?> code. you will input the code must be ?> code above, example: your code here ?>
so now you can just copy below code then you will past your functions.php page. then work fine. i was tested this code, this is 100% worked.
/* * Remove the WP Logo from the My Sites Menu */ function wp_logo_remove() { global $wp_admin_bar; foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { $menu_id = 'blog-' . $blog->userblog_id; $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname; $wp_admin_bar->add_menu( array( 'parent' => 'my-sites-list', 'id' => $menu_id, 'title' => $blogname, 'href' => get_admin_url( $blog->userblog_id ) ) ); } } add_action( 'wp_before_admin_bar_render', 'wp_logo_remove' );
You have to enjoy this articel? Don't forget subscribes this site.
If you want to get our update article, then please subscribe this site.
This title last post
2,519 views | December 21, 2015 | 11:29 PM