How to add a redirect to this login script? (1 post)

  1. mjefferson96
    Posted 4 years ago #

    Can anyone show me how to add a redirect to http://www.mydomain.com/client-page/ after someone logs in using this script?

    <?php if (!(current_user_can('level_0'))){ ?>
    		<h4>Login below</h4>
    	  <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="30" />
    		<br />
    		<input type="password" name="pwd" id="pwd" size="30" />
    		<br />
    		<input type="submit" name="submit" value="Send" class="button" />
          		<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 { ?>
    		<h4>Logout below</h4>
    		<a href="<?php echo wp_logout_url(urlencode($_SERVER['REQUEST_URI'])); ?>">logout</a><br />
    <?php }?>

Topic Closed

This topic has been closed to new replies.

About this Topic