If logged in..
-
I made a loginform in my left sidebar. But when someone logged in, the loginform is still there. Now i want when someone is logged in that the loginform dissapear, and that a logout link appear.
https://www.dakzoekje.nlI’v put this code (loginform) in my leftsidebar.php:
<div>
<?php
if ( $error )
echo "<div id='login_error'>$error</div>";
?>
<font color="#8b8b8b">
<form name="loginform" id="loginform" action="wp-login.php" method="post">
<?php _e('Username:') ?><input style="font-size: 10pt" type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1); ?>" size="15" tabindex="1" /><?php _e('Password:') ?><input style="font-size: 10pt" type="password" name="pwd" id="pwd" value="" size="16" tabindex="2" />
<input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />
<?php _e('Remember me'); ?>
<font size="1"><input type="submit" style="border: 1px solid" name="submit" id="submit" value="<?php _e('Login'); ?> »" tabindex="4" /></font>
<input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($redirect_to); ?>" /></form>
<div>
<?php if (get_settings('users_can_register')) : ?>
<a>/wp-register.php"><?php _e('Register') ?></a>
<?php endif; ?>
<a>/wp-login.php?action=lostpassword" title="<?php _e('Password Lost and Found') ?>"><?php _e('Lost your password?') ?></a></font></div></div>
- The topic ‘If logged in..’ is closed to new replies.