A simple hamburger menu for my article explaining how to create these menus
A Pen by Mikael Ainalem on CodePen.
//Remove MY SITES in Nav Menu for Admins | |
function remove_admin_bar_links() { | |
global $wp_admin_bar, $current_user; | |
if ($current_user->ID != 2) { | |
$wp_admin_bar->remove_menu('my-sites'); // Remove the my sites link | |
$wp_admin_bar->remove_menu('new-content'); // Remove the content link | |
} | |
} | |
add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' ); |