• Resolved sheshman

    (@sheshman)


    Hi All,

    First of all thanks for this great plugin, when i searched the forum i saw that many users having problem with re-direction after login plugin if they have installed the custom message plugin.

    So i’ve solved the issue without hard codding and wanted to share with who needs it 🙂

    re-direction plugin needs “swpm_redirect_to” parameter on the address bar but some how custom message plugin doesn’t do that, all you need to do is add that parameter manually,

    now go to your “Simple WP Membership Custom Message::Settings” page and edit your “Restricted Post (Not Logged-in)” like below;

    <b><font color="red"><center><a href="../uye-giris/" id="linkid">Click here to login</a></center></b></font><script>var x = window.location.href;document.getElementById("linkid").href = "../yourloginpageurl/?swpm_redirect_to="+encodeURIComponent(x);</script>

    what we did ? : we have used the pure javascript to get current url and add to login link with proper “swpm_redirect_to” parameter.

    Tested with two different project and it works perfectly, with this solution you can use custom message and re-direct plugin without any problem.

    Sorry for poor english and have a nice day.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Custom Messages with Re-Direction Problem Solved’ is closed to new replies.