Above the menus in the header, I'd like to add some text that knows if a user is logged in. If they are logged in, it says Welcome "First Name" and then shows the option to log-out. If they are not logged in, then there is no message displayed.
Is this easy to do - any help would be much appreciated.
Cheers
Just to add, I have used the following code in other themes and it has worked great. Just need to know how to add this to Montezuma.
Code:
<?php global $user_identity; if ($user_identity): ?> <h2 class="site-description"> <?php global $current_user; get_currentuserinfo(); echo 'Welcome ' . $current_user->user_firstname ; ?> – (<a href="<?php bloginfo('wpurl'); ?>/wp-login.php?action=logout" title="Logout">Logout</a>)</h2> <?php endif; ?>