-
-
Save joedooley/527db2dc2ea12235fbb4 to your computer and use it in GitHub Desktop.
WordPress Frontend Login Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* Template Name: Login Page AA */ ?> | |
<?php get_header(); ?> | |
<!-- section --> | |
<section class="aa_loginForm"> | |
<?php global $user_login; | |
if(isset($_GET['login']) && $_GET['login'] == 'failed') | |
{ | |
?> | |
<div class="aa_error"> | |
<p>FAILED: Try again!</p> | |
</div> | |
<?php | |
} | |
if (is_user_logged_in()) { | |
echo '<div class="aa_logout"> Hello, <div class="aa_logout_user">', $user_login, '. You are already logged in.</div><a id="wp-submit" href="', wp_logout_url(), '" title="Logout">Logout</a></div>'; | |
} else { | |
wp_login_form($args); | |
$args = array( | |
'echo' => true, | |
'redirect' => home_url('/wp-admin/'), | |
'form_id' => 'loginform', | |
'label_username' => __( 'Username' ), | |
'label_password' => __( 'Password' ), | |
'label_remember' => __( 'Remember Me' ), | |
'label_log_in' => __( 'Log In' ), | |
'id_username' => 'user_login', | |
'id_password' => 'user_pass', | |
'id_remember' => 'rememberme', | |
'id_submit' => 'wp-submit', | |
'remember' => true, | |
'value_username' => NULL, | |
'value_remember' => true | |
); | |
} | |
?> | |
</section> | |
<!-- /section --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment