It's unclear for me if you want to hide the author box for users with 'editor' role of for the user 'Editor'.
Here's the code for detecting if an user has the editor role and that shows the author box for all other roles:
// Add this in you single post template
// See https://developer.wordpress.org/themes/basics/template-hierarchy/
// First we get the author role:
global $authordata; // The author object for the current post. See https://codex.wordpress.org/Global_Variables
$author_roles = $authordata->roles; // Get all author roles. See https://codex.wordpress.org/Class_Reference/WP_User
$author_role = array_shift( $author_roles ); // Get the user role
// Now we check if the author is an editor
if ( $author_role != 'editor' ) {
// Show the author box
}
If you rather want to hide the author box for a specific 'Editor' user, use this instead:
// Add this in you single post template
// See https://developer.wordpress.org/themes/basics/template-hierarchy/
// First we get the author username:
global $authordata; // The author object for the current post. See https://codex.wordpress.org/Global_Variables
$username = $authordata->user_login; // Get the author username. See https://codex.wordpress.org/Class_Reference/WP_User
// Now we check if the author username is 'Editor'
if ( $username != 'Editor' ) {
// Show the author box
}
Let me know if you find this useful.