amember4 login using shortcode and maintaining the original page

Discussion in 'aMember Pro v.4' started by benfitts, Apr 19, 2012.

  1. benfitts

    benfitts Member

    Joined:
    Apr 10, 2008
    Messages:
    111
    Hi there.

    I have an amember 4.2.1 installation with Wordpress. This is a test site.

    I want to use an amember4 shortcode like:

    [am4info var=loginurl]

    BUT I also want to make sure it redirects the user to the page they were on.

    So in my wordpress/amember/error code I'd have something like:

    We're sorry but there is content on this page that is only accessible to members who are logged in to their account.

    [am4info var=loginurl title="Login"] to your account.
    [am4info var=signupurl title="Signup"] for your free account.

    The problem I'm encountering is that the login takes people back to the home page. It doesn't take them back to the page they were originally on.

    Is there a way to make that shortcode work where it will redirect the user on login back to the original page?

    (Again using wordpress and amember 4.2.1)
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Sure this can be implemented. Contact me in helpdesk and provide link to that post, I will make modifications and send updated plugin.
  3. benfitts

    benfitts Member

    Joined:
    Apr 10, 2008
    Messages:
    111
    That is not what I want.

    I don't want you to make modifications that change my code.

    I want to have a general error message using your amember plugin error messages. I want to include that shortcode in the error message in such a way that it will return back to the original page after they login.

    Why doesn't it work this way? It should. It seems logical for this to be the default behavior. What else is the point of having those error messages?
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Ok. this will be included in next version of plugin.
  5. cmarquez1

    cmarquez1 New Member

    Joined:
    Jun 26, 2007
    Messages:
    1
    any news on this fix?

Share This Page