I am trying to display a logout link when users are logged in and make it disappear when they are not logged in.
The code I have so far works for the login and register links due to a plugin that I have installed, so 'login' and 'register' disappear just fine, now for logout I need some assistance... Here is the code:
<ul id="login-navigation">
<?php if ( is_user_logged_in() ) {
$user = wp_get_current_user();
echo 'Welcome <strong>'.$user->display_name.'!</strong> ';
} else { ?>
<a href="/wp-login.php?action=register" class="simplemodal-register" >Register</a>
<strong>or</strong>
<?php }
wp_loginout( get_permalink() ); ?>
</ul>