I would like the title of my site to read "Login" when a user logs in to my Wordpress site.
I don’t know how to repeat the username of the current user, here is the code I received ...
<?php
if ( is_user_logged_in() ) {
echo '<ul id="mem" class="clearfix">
<li><a href="#">Logged in as Username</a></li>
<li><a href="#">Logout</a></li>
</ul>';
} else {
echo '<ul id="mem" class="clearfix">
<li><a href="#">Register</a></li>
<li><a href="#">Login</a></li>
</ul>';
}
?>
and I would like to replace Username.
Any help is greatly appreciated.
Thank,
Mark
source
share