Custom filters: Single post show author meta for Authors

// Add this in you single post template
// See

// First we get the author role:
global $authordata; // The author object for the current post. See
$author_roles = $authordata->roles; // Get all author roles. See
$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

Scroll to Top