Welcome Statement or Log in Link
-
I am looking to make a function for my banner that will display a message with the username if they are logged in, or a register link if they are not. I am totally new to this so help is appreciated, this is what I have started to piece together:
<?php if (is_user_logged_in()){ global $current_user; get_currentuserinfo(); echo('Welcome to Hookahi ' . $current_user->user_firstname . ' | '); } else { echo <?php printf(__(<a title=href="%s" rel="lightbox[registerform]">Register</a>, THEME_NS) , get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?> }; ?>
The lightbox plus thing is from a code I integrated in to the comment template so that the “you must be logged in thing” is a lightbox with a return redirect. I tried to just copy it here but its not working.. please help.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Welcome Statement or Log in Link’ is closed to new replies.