Hello I am using Hidepost plugin in Wordpress with Amember. When a member clicks the "login to view content link" it takes them to the amember login form. The problem is it will redirect them to the "product url" when they log in. But I want it to redirect them to the original page they were on. I have tried all the remcommended options posted on this site and i cant get it to work. ------------------------------------------------------------------ I have tried placing the following code into the amember login.html - <input type=\"hidden\" name=\"amember_redirect_url\" value=\"http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."\"> also tried: <input type="hidden" name="amember_redirect_url" value="/redirect_url/>"/> also tried: <script type="text/javascript" language="JavaScript"><!-- document.write('<input '); document.write(' type="hidden" '); document.write(' name="amember_redirect_url" '); document.write(' value="' + document.URL + '">'); //--></script> But it still does not redirect them - it seems to either default to product url or just go to "www.mysite.net/redirect_url/ - page not found" I have also tried removing - {if $redirect_url} <input type="hidden" name="amember_redirect_url" value="{$redirect_url|escape}" /> {/if} but still does not work?? What am i missing as it does say in the address bar of the login.html page: "http://www.mysite.net/members/login.php?redirect_to=/member-only-section.html" Thankyou for you help Brenton
I am having the same problem. I changed "http://www.mysite.net/members/login.php?redirect_to=/member-only-section.html" to "http://www.mysite.net/members/login.php?redirect_url=/member-only-section.html" in hidepost.php. It is still not redirecting for me after making this change. This is the code in my login.html: {if $redirect_url} <input type="hidden" name="amember_redirect_url" value="{$redirect_url|escape}" /> {/if} Any help is greatly appreciated
Try to change url to Code: http://www.mysite.net/members/login.php?amember_redirect_url=/member-only-section.html