Check if user is logged in


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. if ( is_user_logged_in() ) :
  3. echo 'some stuff for registrants!';
  4. else :
  5. echo 'some stuff for people not logged in.';
  6. endif;
  7. ?>

URL: http://wordpress.org/support/topic/members-only-page

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.