How does one remove the "sub-menu" that appears to the right of each site listed in the My Sites drop down from the admin bar?

That is, I want to have a list of My Sites without the Dashboard/New Post/Manage Comments/Visit Site links appearing to the right of the arrow for each site in the My Sites drop down list.

This would simplify the user interface significantly for my users.

Any guidance would be greatly appreciated. Thank you.

  • Please do share, what have you tried yet to accomplish this and the relevant codes. Feb 2, 2014 at 6:57

1 Answer 1


Old question but I just came accros a fix.

I hope it helps someone else.

Add this to your theme functions.php file

add_action( 'wp_before_admin_bar_render', 'remove_mysites_comment_link' );
function remove_mysites_comment_link () {
    global $wp_admin_bar;
    foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
        $menu_id_c = 'blog-' . $blog->userblog_id . '-c';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.