WordPress.org

Support

Support » Plugins and Hacks » Checking if user is logged in a post or page or portfolio

Checking if user is logged in a post or page or portfolio

Viewing 1 replies (of 1 total)
  • mrpritchett
    Participant

    @mrpritchett

    Your best bet is use PHP and use is_user_logged_in(). Something like this:

    `<?php if ( !is_user_logged_in() ) { ?>
    “Your javascript includes here”
    <?php { ?>

    The “!” indicates that it is the opposite of the condition so “use is NOT logged in.”

Viewing 1 replies (of 1 total)
  • The topic ‘Checking if user is logged in a post or page or portfolio’ is closed to new replies.