[Tutorial] Make Login Form In Your WordPress Theme

If you want to make a login page in your wordpress theme, its easy as butter. You can do this by addind the following code snippet. Place this code at a place where you would like the login form to be

<?php if (!(current_user_can(‘level_0’))){ ?>
<form action=”<?php echo get_option(‘home’); ?>/wp-login.php” method=”post”>
<input type=”text” name=”log” id=”log” value=”<?php echo wp_specialchars(stripslashes($user_login), 1) ?>” size=”20″ />
<input type=”password” name=”pwd” id=”pwd” size=”20″ />
<input type=”submit” name=”submit” value=”Send” />
<label for=”rememberme”><input name=”rememberme” id=”rememberme” type=”checkbox” checked=”checked” value=”forever” /> Remember me</label>
<input type=”hidden” name=”redirect_to” value=”<?php echo $_SERVER[‘REQUEST_URI’]; ?>” />
<a href=”<?php echo get_option(‘home’); ?>/wp-login.php?action=lostpassword”>Recover password</a>
<?php } else { ?>
<a href=”<?php echo wp_logout_url(urlencode($_SERVER[‘REQUEST_URI’])); ?>”>logout</a><br />
<a href=”http://XXX/wp-admin/”>admin</a>
<?php }?>

Once saved, your theme will display a login form. Definitely easier and quicker for login!

Related posts

Converting the formats of videos to iPad, iPod, and iPhone


Assassin’s Creed Amazing Historic Facts


10 Things Apple is Worth More Than