Got it!
Step 1) Download the User Role Editor plugin here.
Step 2) Set a user role with a specific level (i.e., “level 5”)
Step 3) Add the following code where you want to display the conditional text.
<?php $authorrole = esc_attr(get_the_author_meta('user_level') );
if ($authorrole == 5) { ?>
<p>This displays if the user is in the group set to "level 5"</p>
<?php } else {?>
<p>If the user is in any group other than the one set to "level 5" this displays.</p>
<?php } ?>
Simply change the # to the level you want to use as the level. Alternatively you should be able to change the function so that if a user is greater than a certain level it will display (though I’ve not tested this)… like so…
<?php $authorrole = esc_attr(get_the_author_meta('user_level') );
if ($authorrole > 2) { ?>
<p>This displays if the user is in the group set higher than "level 2"</p>
<?php } else {?>
<p>If the user is in any group other than the one set lower than "level 2" this displays.</p>
<?php } ?>
Hope this helps others!
Or, let’s say you want to get the information for the current user and display something if they’re at or above a level.
That would be done like this…
<?php
global $current_user;
get_currentuserinfo();
$authorrole = esc_attr($current_user->user_level );
if ($authorrole == 5) { ?>
Do something.
<?php } else {?>
Do something else.
<?php } ?>