The correct answers to the above solution-question isare by else programming basic:
if( current_user_can('administrator')) {
<!-- only administrator will see this message -->
} else {
if( current_user_canwp_get_current_user('editor')) {
<!-- logic thinking tells here but it is not here -->
} else {
<!-- only editor but no administrator will see this message -->
?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php
} else {
<!-- the user is neither editor or administrator -->
}}
Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.
Remember you should always use this code to call that above to minimize cpu code usage:
if(is_user_logged_in()){}