What code do I need for the template's PHP to argue if the current status of the visitor is logged in or out? I will be using this to display a sign in form if they are not currently logged in and a sign out anchor if they are. Thanks!
What code do I need for the template's PHP to argue if the current status of the visitor is logged in or out? I will be using this to display a sign in form if they are not currently logged in and a sign out anchor if they are. Thanks!
I think this may relate to is_user_logged_in, doing some reading now, help is still appreciated! ;-)
<?php
if ( is_user_logged_in() ) {echo 'WordPress says you\'re logged in!';}
else if ( !is_user_logged_in() ) {echo 'WordPress says you\'re <b>not</b> logged in!';}
?>
This is a function and a handy list of functions can be found at...
http://codex.wordpress.org/Plugin_API#Functions_You_Can_Override
Thank you for sharing this, I was looking for the exact thing.
This topic has been closed to new replies.