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?

2 Answers
2

Yes, that’s good.

You can be a little safer using <?php if(current_user_can('manage_plugins') ); ?>

Leave a Reply

Your email address will not be published. Required fields are marked *