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. ?>


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.