Hi Guys , You can retrieve any User Logged detail on your site. follow just these steps given below.
-
Take backup of your file before change on it
-
Adde this code any where you want add this (i.e footer.php, header.php)
<div id=”menutop”> <p style=”text-align: right”><?php if ( is_user_logged_in() ) { ?> Welcome: <?php global $current_user; get_currentuserinfo(); echo($current_user->user_firstname . ” ” . $current_user->user_lastname . “, “); ?> <a href=”<?php echo wp_logout_url(); ?>&redirect_to=/”>Logout</a> <?php } else { ?> You are not logged in –> <a href=”/wp-login.php?redirect_to=/”>Client Login</a> <?php } ?> </p> </div>
Enjoy!
Hey There. I found your blog using msn. This is a very well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. Ill definitely return.