Hide login form if logged in
-
I am trying to hide the login form that I have added to my header when a user is logged in. Here is the code that I have so far, but it isn’t working for some reason. My site is https://www.blindbidpro.com. Thanks in advance for any help!
<div id="header-signup"> <div class="headerloginform"> <?php if ( is_user_logged_in() ) { wp_loginout(); } else { <form name="loginform" id="loginform" action="https://www.blindbidpro.com/wp-login.php" method="post"> <div class="aligntop"> <input value="Username" class="input" type="text" size="20" tabindex="10" name="log" id="user_login" onfocus="if (this.value == 'Username') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Username';}" /> </br><input name="rememberme" id="rememberme" value="forever" tabindex="90" type="checkbox"> Remember Me </div> <div class="aligntop"> <input value="Password" class="input" type="password" size="20" tabindex="20" name="pwd" id="user_pass" onfocus="if (this.value == 'Password') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Password';}" /></br><a href="https://www.blindbidpro.com/wp-login.php?action=lostpassword">Forgot your password?</a> </div> <div class="aligntop"> <input name="wp-submit" id="wp-submit" value="" tabindex="100" type="submit"> <input name="redirect_to" value="https://www.blindbidpro.com" type="hidden"> <input name="testcookie" value="1" type="hidden"> </div> <div class="aligntop"> <a href="https://www.blindbidpro.com/wp-login.php?action=register" class="link1"></a> </div> </form> ; } ?> </div> </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hide login form if logged in’ is closed to new replies.