• I want to hide a page from a user,(user_id == 3). It could be any page, I just want to know how to hide a page from that specific user.

    There are so many php functions that I’m not sure where to start with this one being a newbie here.

    Maybe someone could transform this?

    `<?php $user_id = get_current_user_id(); ?>
    <?php if ( $user_id == 3 ) { ?>
    <p>This text is only visible to user 3.</p>
    <?php } ?>`

    If not, no worries. All I really need right now is a lead, which WordPress tags should I be using to do this?

    Thanks in advance!

  • The topic ‘Hide page from User’ is closed to new replies.