function remove_admin_bar_links() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('site-name');
}
add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );
function my_admin_bar_menu() {
global $wp_admin_bar;
if ( !is_super_admin() || !is_admin_bar_showing() )
return;
$wp_admin_bar->add_menu( array(
'id' => 'site-name',
'title' => get_bloginfo('name'),
'href' => get_bloginfo('home_url'),
'meta' => array('target' => '_blank' ) );
}
add_action('admin_bar_menu', 'my_admin_bar_menu');
There is actually a lot more you can do. But this should get your started in the right direction.
Sources:
https://wordpress.stackexchange.com/questions/11522/just-wanted-to-share-about-the-admin-bar
http://wpengineer.com/2113/add-menus-to-the-admin-bar-of-wordpress/
Related Posts:
- How do I add an icon to a new admin bar item?
- remove admin bar new post/link/media sub menu
- How do I remove the admin bar (styling) from frontend only?
- hide WordPress 3.1 admin menu
- WordPress Admin Bar Moving Links
- WP admin bar disappeared
- How to preview your website without the top WordPress admin bar, but remain signed in?
- Make ‘Howdy, [name]’ function as log out button
- Disable the admin bar
- How can I specify the position of an admin bar item added with $wp_admin_bar->add_menu() or add_node()?
- Replace admin bar logo
- Open Admin bar “Visit site” in a new window
- Admin Bar CSS left over after removal
- Is there a ready-made fix to make the admin bar not obscure content?
- How to remove wordpress admin bar in dashboard
- Is there an easy way to move the wp_admin_bar to my own location?
- Admin toolbar not displaying on pages
- Modify the WordPress admin bar CSS?
- How to hide “post” link from the admin bar
- Question about how global $wp_admin_bar works
- Add class to WordPress admin bar?
- WP Admin Bar shown at the bottom
- Hide admin tool bar from back end dashboard [duplicate]
- Remove admin menu, admin header and admin footer for authors
- Hide admin bar on all pages except homepage
- How to remove admin bar logo in WordPress using plugin
- Exclude admin bar from showing avatar customization
- Top admin bar / toolbar not showing even when logged in, but empty top margin showing?
- Why is the admin bar appearing (on certain pages) for non logged-in users?
- nginx-fastcgi caching causes admin bar to dissapear
- set admin bar to visible for authors, contributors, moderators and admins
- How do I display wordpress admin bar outside wordpress?
- New Admin Bar Not Functioning
- Hide admin bar by default
- custom page – not able to show toolbar on top
- How can I remove menu items from “my sites” on a multi-site network?
- Set anchor target for admin bar nodes
- Using an SVG icon for an Admin menu bar item
- need help styling dashicon in admin bar
- Loading Admin Toolbar in header not Footer to Scroll it with page
- Display wordpress admin bar outside wordpress in Magento?
- What code removes the admin bar for all users in WordPress 3.3?
- Admin Bar below footer as unstyled list of links
- How do I enable the text view of the side admin bar
- Where is admin bar supposed to appear? [closed]
- Why do you add wp_footer() in footer file to add an admin bar in the top of the page?
- How to remove logged user profile href link
- Remove admin bar “My Sites” link from contributor roll
- How to disable or customize admin bar in back-end
- How do you disable the admin-bar.css
- Customize WordPress admin-bar
- Disable the admin bar / probleme with responsive menu
- Why toolbar would not be visible in the frontend but visible in the admin?
- Disable Admin Bar for specific content
- Top admin tool bar not displaying for “Editor” user role
- How to change username in wp admin bar
- how to hide top bar button on /wp-admin/edit.php
- How to add Mark as private to WordPress Admin Bar for Posts
- When admin is logged in, admin-bar-rtl.min.css is not loaded on website view (the admin-bar is shown in the footer without CSS)
- disable wp admin bar for customers logged in
- two different home is showing inside my dashboard?
- Admin Bar items active only on plugin page
- Missing Toolbar/Admin Bar on subdomain page using WordPress integration
- Top Admin Bar Never Shows Up
- Admin and Toolbar on the bottom, how to dropup menus?
- Display Admin Bar when Logged
- Why do previews work in one browser, but not another?
- Disabling the Admin Bar | Where does code go?
- Add code to admin bar only
- Why do my posts look like they are in “admin editing mode”?
- WordPress Admin Bar Overlapping Twitter Bootstrap Navigation [closed]
- Admin bar and fixed header issue?
- Remove top admin bar
- Add visit site to your toolbar instead of being in the dropdown
- Hide admin bar on certain post type
- Attaching a navigation menu to the admin bar?
- Add admin bar link to edit author
- Admin Bar (Toolbar) not showing on custom PHP file that loads WordPress
- How to get an array of menu items from the toolbar?
- Disable Admin Bar Render on Plugin Page
- Manually add admin bar
- Adding with javascript to admin bar. Works in Chrome/Safari, not Firefox
- Toolbar/topbar missing on homepage only?
- Where is this inline CSS code [closed]
- What determines whether admin toolbar is shown to a logged-in user?
- WordPress Admin Bar Covering & Overlapping Fixed Menu Header [closed]
- WordPress admin panel framework weird layout on server side
- Center and hide overflow of WP toolbar custom links
- Hide admin toolbar based on a query string
- How to call for bloginfo inside function in functions.php?
- Can you refresh ONLY the wordpress adminbar and not the whole page?
- call adminbar greeting in other place
- products category page editing
- custom filtering admin columns
- Different Admin language
- Admin Bar – Customizer Label Change
- How to remove an item from menu bar’s +New menu based on User role
- How can I place a page link to the sidebar admin bar?
- Custom admin bar css on front end bug
- Admin menu link with variable