Display logged in user problem
-
Hi there
Having a little issue here:
<?php
if ( is_user_logged_in() ) {
echo ‘Welcome, ‘;
} else {
echo ‘Welcome, visitor!’;
};
?>Using the above code to display a welcome phrase to the user who is logged in. However, how do I adapt the code to say “Welcome, [username]”? So that once the person is logged in it says “Welcome, geekonthepc” if the user were geekonthepc.
Many thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Display logged in user problem’ is closed to new replies.