How to remove the Gravatar image from Username column in the All User admin page?

enter image description here

4 Answers
4

Since there is no special avatar column to unset (the avatars are inside the username column), you could try instead to hide the avatars via css:

function hide_avatars_wpse_94126() {
    if(!current_user_can('manage_options')){
        // hide only for non-admins
        echo "<style>.users td.username img.avatar{display:none !important;}</style>";
    }
}
add_action('admin_head-users.php','hide_avatars_wpse_94126');

where they are hidden for non-admins.

The result will be like this:

Hide avatars

Leave a Reply

Your email address will not be published. Required fields are marked *