Want it to Show “Not Logged In”
-
I’m using the following text to show when and if someone is logged in.
<?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?> | You are not /wp-login.php?redirect_to=<?php the_permalink(); ?>”>logged in.<?php else : ?><?php if ( $user_ID ) : ?> | You are logged in as /wp-admin/profile.php”><?php echo $user_identity; ?>.<?php endif; ?>
When their not logged in, it shows nothing. When they are logged in, it says who they are logged in as. The only time it says “not logged in” is when I don’t allow non-registered users to reply to posts. I’m sure comment_registration is not the right get_option. Can someone help me out with this please?
Shilo
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Want it to Show “Not Logged In”’ is closed to new replies.