/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
add === function my_admin_bar_link() { global $wp_admin_bar; if ( !is_super_admin() || !is_admin_bar_showing() ) return; 'id' => 'diww', 'parent' => 'my-blogs', 'title' => __( 'Title of the link you want to add'), 'href' => admin_url( 'http://mysitesurl.com/wp-admin.php' ) ) ); } add_action('admin_bar_menu', 'my_admin_bar_link'); remove ====== function remove_admin_bar_links() { global $wp_admin_bar; $wp_admin_bar->remove_menu('my-blogs'); $wp_admin_bar->remove_menu('my-account-with-avatar'); } add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );