I have a custom form for logging in (in a modal window) that looks like this:
<form name="loginform" id="loginform" action="<?php echo wp_login_url( get_permalink() ); ?>/wp-login.php" method="post">
<p class="login-username">
<label for="user_login">Username or Email Address</label>
<input type="text" name="log" id="user_login" class="input" value="" size="20">
</p>
<p class="login-password">
<label for="user_pass">Password</label>
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20">
</p>
<p class="login-submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary" value="Log In"></form>
How can I set it to redirect to the current page after login (again this form pops up in a modal)? I thought that I would have been able to use the standard redirect url parameter, but it still redirects straight to /wp-admin.