Return to Snippet

Revision: 44735
at April 17, 2011 00:54 by prwhitehead


Initial Code
/**
* Usage: add user_login_form(); to your theme somewhere. 
*
*
*/


function user_login_form(){ ?>
<form id="loginform" action="<? echo site_url('wp-login.php', 'login_post') ?>" method="post">
    <ul id="login_list">
        <li>
        	<label for="user_login">Username / Email Address
        		<input type="text" name="log" id="user_login" class="input round" value="<?php echo esc_attr($user_login); ?>" />
            </label>
        </li>
        <li>
        	<label for="user_pass">Password
        		<input type="password" name="pwd" id="user_pass" class="input round" value=""  />
            </label>
        </li>
        <? do_action('login_form'); ?>
        <li class="rememberme-check-box">
            <input name="rememberme" type="checkbox" id="rememberme" value="forever" />&nbsp;Remember you?
            <input type="hidden" name="redirect_to" value="<?php echo esc_attr(get_option('home')); ?>/?action=user" />
        </li>
        
        
        <li class="submit">
            <a href="<? echo get_option('home'); ?>/?action=user" title="Lost your password? Reset it here..." class="button" id="password-reset">
                Forgot Your Password?
            </a>
            <input class="button" type="submit" id="signin" value="Sign In" />
        </li>
    </ul>
</form> 	


<? }

Initial URL

                                

Initial Description
Add a login form to your wordpress themes frontend.

Initial Title
Wordpress: Login form for your themes

Initial Tags
form, login, php, template, wordpress, theme

Initial Language
PHP