Page 1 of 1

redirect issue-- getting frustrated.

PostPosted: May 27th, 2011, 9:37 am
by seelkat
Hello,

I am having a simple problem with redirection-- I know there must be something simple that I am missing.

Right now I am only offering free subscriptions - level 0. I have activated free subscriptions. I set-up- a membership options page which includes the s2 pro widget for login/registration. ***Here is what I want: After logging in, I want users to be redirected back to the protected page they were trying to access before being sent to the membership options page/registration... I do not want them to go to a different login welcome page. Is there a URL+/- a special redirection code that needs to go into the login welcome page url box to accomplish this? I've tried leaving the welcome page url blank thinking it would use wordpress defaults, but it doesn't... it sends me to my post page.

FYI. I set the s2 widget to go to "previous page" & this works only when a user logs in from a public page, but not after being sent to the membeship options page.

Re: redirect issue-- getting frustrated.

PostPosted: May 28th, 2011, 12:54 am
by Cristián Lávaque
Right, if the person gets sent to the Membership Options Page first and then tries to login with the widget, the widget won't know where he was before, he'll come back to the page he logged in from.

You could use the Membership Options Page variables. WP Admin -> s2Member -> Scripting / API -> Membership Options Page / Variables

Create a login link which, after login, would have the person redirected to the page he wasn't allowed to see before. You can add the redirection at the end of the URL to the login page, e.g. /wp-login.php?redirect_to=/the-page-you-want.