Hey there, folks.
I’m trying to write a short condition-based sidebar menu for my blog. I’m trying to add a few options only available to user accounts level 1 and up. While it works fine for all other accounts, my admin account returns a value of 0 when I call $user_level.
Here’s how I get the value:
<?php global $user_ID, $user_email, $user_identity, $user_level; ?>
I then use that value here:
<?php if ( $user_level >= 1 ) : ?>
I checked the user_level by doing a simple print. Any ideas why the admin account returns as 0 rather than 9 (or is it 10?)
- The topic ‘$user_level for admin account returned as 0?’ is closed to new replies.