• I have installed a child theme of ‘Cazuela’ and am attempting to make my first ‘real’ customization of it in the form of a custom login, which Ideally will work similar to the one found here. I have resolved all the know PHP format/WordPress issues that I can think of, but the forms do not appear – i can see them when i view source though. I don’t know what but they don’t work and I think they should. Help please?

    The test site can be seen here

    <!-- BEGIN Custom Login here -->
    
    		<!--
    			Easy fancybox plugin installed, activated (Yes!)
    			Registration Settings -> Anyone can register (Yes!)
    
    		-->
    
    		<!-- Should work like == https://dev.thecodegenie.com -->
    
    		<!-- STEP ONE: Create Signin Form -->
    		<div style="display:none;">
    			<div id="sign_in" class="modal">
    				<h2><strong>Login</strong></h2>
    					<?php $args = array(
    						  'echo'           => true,
    						  'redirect'       => site_url($_SERVER['REQUEST_URI']),
    						  'form_id'        => 'loginform',
    						  'label_username' => __( 'Username or Email address' ),
    						  'label_password' => __( 'Password' ),
    						  'label_remember' => __( 'Remember Me' ),
    						  'label_log_in'   => __( 'Sign In' ),
    						  'id_username'    => 'user_login',
    						  'id_password'    => 'user_pass',
    						  'id_remember'    => 'rememberme',
    						  'id_submit'      => 'wp-submit',
    						  'remember'       => true,
    						  'value_username' => NULL,
    						  'value_remember' => true );
    
    					wp_login_form( $args );?>
    
    		   		<p class="forgot_password_link"><a href="#lost_password" class="fancybox">Forgot your password?</a></p>
    				<p>Don't have an account? <a href="#sign_up" class="fancybox">Sign up</a>!</p>
    			</div>
    		</div>
    
    		<!-- Form 1: Signin (uses email address) -->
    		<a href="#sign_in">Login 111</a>
    		<?php
    		function email_address_login($username)
    		{
    			$user = get_user_by_email($username);
    			if(!empty($user->user_login))
    			$username = $user->user_login;
    			return $username;
    			}
    		add_action('wp_authenticate','email_address_login');
    		?>	
    
    		<!-- Form 2: Signup  
    
    			 Do not change the name and id of input fields.
    			 They must be user_email and user_login
    		-->
    		<div style="display:none;">
    			<div id="sign_up" class="modal">
    				<h2><strong>Sign up</strong> for Superheroes 101</h2>
    					<form action="<?php echo 'test.xaviers-children.net("wp-login.php?action=register", "login_post")'; ?>">class="user_new" id="user_new" method="post">
    						<input id="user_login" name="user_login" size="30" type="text" placeholder="Select a username">
    
    						<input id="user_email" name="user_email" size="30" type="text" placeholder="Email address">
    
    						<?php do_action('register_form'); ?>
    
    						<input id="register" type="submit" value="Sign up">
    					</form>
              		<p>A password will be emailed to you</p><br>
              		<p>Already a user? <a href="#sign_in" class="fancybox">Sign in 222</a>!</p>
    			</div>
    		</div>
    
    		<!-- NOTES:
    			 Customize default login screen using: Custom Login or A5 Custom Login
    
    			 Customize New Member Emails: WordPress emails an auto generated password to new user in a predefined format. Usually the sender’s name is also “wordpress”. You might want to change this format and name.
    
    			 Go to the directory where wordpress is installed and navigate to wp-content folder. Find a file named pluggable.php  . Search for the variables $from_name and $from_email. Change their values from ‘wordpress’ to whatever you want.
    
    			 This is not a permanent fix (I don’t think there is any). Every time WordPress updates, you should run a check for these values.
    		-->
    
    		<!-- Form3: Forgot Password? -->
    
    		<div style="display:none;">
    			<div id="lost_password" class="modal">
    				<h2>Get new password on your registered email-id</h2>
    					<form name="lostpasswordform" id="lostpasswordform" action="https://test.xaviers-children.net/wp-login.php?action=lostpassword" method="post">
    						<input type="text" name="user_login" id="user_login" class="input" value="" size="20" placeholder="username or email-id">
    
    						<input type="hidden" name="redirect_to" value="<?php echo home_url().'/profile.php';?>">
    
    						<input type="submit" name="wp-submit" id="wp-submit" value="Get New Password">
    					</form>
              <p>Would like to try again? <a href="#sign_in" class="fancybox">Sign in 333</a>!</p>
        </div>
    </div>
    
    		<!-- END CUSTOM LOGIN -->
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom Login Page (’ is closed to new replies.