Hello forumers,
I have a question... If I would want to make Register/Login button in some part of my site. Then in what code should I put images with links to show ONLY when poeple are not Registered/Logged in?
Hello forumers,
I have a question... If I would want to make Register/Login button in some part of my site. Then in what code should I put images with links to show ONLY when poeple are not Registered/Logged in?
<?php
if ( is_user_logged_in() ) {
echo 'Welcome, registered user!';
} else {
echo 'Welcome, visitor!';// Add HTML for images etc
};
?>
http://codex.wordpress.org/Function_Reference/is_user_logged_in
This topic has been closed to new replies.