I need to show some info only to admins visiting a page, so I need a conditional tag to identify them. So far I have found:
<?php if ( current_user_can('manage_options') ): ?>
is this the correct function?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
I think it is better to check for role rather than specific capability for such purpose, this should work:
<?php if ( current_user_can('administrator') ): ?>
See Roles and Capabilities in Codex.