What i need is to display the visitors user name.
so if Tom logs in, at the top of the page it needs to say "Hey Tom,"
I try this:
<?php
global $current_user;
if ( isset($current_user) ) {
echo $current_user->user_login;
}
?>
What i need to do before?
this?
<?php $current_user; ?>
I have no sucess.
And i try this function:
function get_username() {
global $current_user;
if ( isset($current_user) )
echo $current_user->user_login;
}
with:
<?php $current_user; ?>
And not happen :(
Thanks for all suport.