function SQ7_KleoRemoveActivityReplyComm() { $user = wp_get_current_user(); if ( in_array( 'author', (array) $user->roles ) ) { //The user has the "author" role $output = ''; if (is_user_logged_in()) { $output .= ''; } echo $output; } } add_action('wp_head', 'SQ7_KleoRemoveActivityReplyComm');