I have embedded a login form using HTML form action on two of the pages on my site and would like users to be redirected back to the page they logged in from, but instead it goes back to the main page (the "fixed URL" I specified in the admin centre). amember_redirect_url does not work, and when I leave the fixed URL blank it goes to the member page. Any advice?
amember_redirect_url parameter indeed should work in this situation. Can you copy & paste your form code here.
Sure: <form method=post action='/new/amember/login?amember_redirect_url=(URL)'> <table><tr><td>Username:</td><td><input type=text name=amember_login size=20></td></tr> <tr><td>Password:</td><td><input type=password name=amember_pass size=20></td></tr></table> <input type=submit value='Login'> </form>
So do not pass it in action. Just add another hidden to form: Code: <form method=post action='/new/amember/login'> <table><tr><td>Username:</td><td><input type=text name=amember_login size=20></td></tr> <tr><td>Password:</td><td><input type=password name=amember_pass size=20></td></tr></table> <input type=submit value='Login'> <input type=hidden name='amember_redirect_url' value='(URL)'> </form>
This doesn't seem to work for me. We just upgraded from V3 and the hidden redirect was "redirect_to". I changed as follows: Code: <form name="loginform" id="loginform" action="/premium/member.php" method="post"> <p class="login-username"> <input type="text" name="amember_login" id="user_login" class="input" value="" size="20" tabindex="10"> </p> <p class="login-password"> <input type="password" name="amember_pass" id="user_pass" class="input" value="" size="20" tabindex="11"> </p> <p class="login-submit"> <input type="submit" id="wp-submit" class="button-primary" value="Login" tabindex="12"> <input type='hidden' name='amember_redirect_url' value='http://mysite.com'> </p> </form> Apologies for the excess <p> tags, inherited code. But this doesn't redirect to mysite, it just lands us on member.