WordPress.org

Ready to get started?Download WordPress

Forums

Add something that only admins can see (2 posts)

  1. ruicruz
    Member
    Posted 6 years ago #

    Hi,

    If I want to show a message or add to a plugin a way that only admins can see that message/text, what should I do?
    I am looking for just a simple example.

    Rui

  2. Adam Brown
    Member
    Posted 6 years ago #

    You're talking about in your theme, not the admin screens, right?

    <?php if (current_user_can('level_10')){ ?>
    <!-- html that only admins will see -->
    <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.