• Hi there,

    First many thanks for the great plugin!

    I use s2M (free version for now, site still in development) in a very classical way: free membership (level 0), open registration, 2 paid levels (levels 1 & 2). I also use BuddyPress.

    In spite of the fantastic tutorials and docs, I have an issue I haven’t been able to solve by myself yet: I would like to set up the following login/free registration process for visitors (i.e. for unlogged users).

    1. They access a number of completely open pages and posts for understanding what the site is about. No pb with that step ??

    2. When they try to access a protected content, they are told they must login (if they are already registered) or create a free account (if not). No pb with that step too, using conditional s2M shortcodes ??

    3. Then, I would like to have them logging in (or freely registering) and then being redirected to the protected page they initially tried to access. Or, alternatively, particularly in the case of new registration, I would like to have them welcomed in a page briefly explaining how to use the site, but also proposing a link to return to the page they were trying to access initially.

    My goal with this process is to have them having a seamless discovery of the free content, easily registering “on the fly” and putting no emphasis on their account or possible subscriptions. They will be explained all of this in a second step, when they have had a nice user experience with their free subscription.

    So the issue is really to smoothen their discovery, with a light registration/logging process not interrupting it. Having them redirected to the protected page is important to this end.

    I have not seen any (simple) way to trace and reuse the referrer page. I have been trying to use Theme my Login also, since they provide a referrer capability option after login-in, but this is ineffective with s2M. And the BuddyPress registration process does not provide any such capability either.

    Any advice?

    Thx by now,
    Yves.

    https://www.ads-software.com/plugins/s2member/

Viewing 3 replies - 1 through 3 (of 3 total)
  • You might need to tweak this but I had a similar question when I wanted users to login/register (using linked words on top of my site) and come back to the page they were on to view the protected content, instead of having to navigate or get lost trying to get back to that particular page. Here is the code I was given:

    [s2If !is_user_logged_in()]
    <span style=”font-size:10pt;”>” title=”Login”>Login </span>
    <span style=”font-size:10pt;”>
    Register</span>
    [/s2If]

    I hope you can find out how to tweak it but this is working for me, so it should work for you too.

    Good luck

    Thread Starter ypeynaud

    (@ypeynaud)

    Thanks @cassel but I already have this kind of link in place. However, it doesn’t bring back the user to the initial page after register or log in. Maybe it is because I use BuddyPress, and that the registration process is either handled by BuddyPress (open registration on) or s2Member (open registration off), and not by WordPress.

    That’s why I tried to use the Theme My Login plugin which has a referrer capability, but it seems that s2Member takes over the return path, and that’s my question.

    Thanks for your suggestion.
    Yves.

    Thread Starter ypeynaud

    (@ypeynaud)

    Hello,

    Anybody got an idea on this issue?

    Thx,
    Yves.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirecting to visited page (referrer) after login or registration?’ is closed to new replies.