Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eMember – after login redirect to previous page

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › eMember – after login redirect to previous page

Tagged: redirect

  • This topic has 7 replies, 4 voices, and was last updated 7 years, 11 months ago by admin.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • April 8, 2015 at 4:13 pm #12470
    Dorin
    Member

    Hi, Is there a possibility to redirect the user after the login to the previous page?

    For example, the user access a protected page and the message to login appear. The user then hit the login button, successful login and then the redirect page should be the protected page from where he hit the login button.

    Is this possible?

    Thank you.

    April 8, 2015 at 4:28 pm #69509
    wzp
    Moderator

    Have you tried using the popup login? When you use that option, the user can log in while staying on that page:

    https://support.tipsandtricks-hq.com/forums/topic/emember-use-popup-login-and-redirect-to-page

    June 28, 2017 at 1:53 am #69510
    karencheah
    Member

    Hi, I’m wondering if this redirect is possible if we don’t use the popup login. We have a situation where we are using a plugin for a directory and to submit a listing to the directory, will require login. So the configuration in the directory plugin need the actual login page URL to get member to login first. However, after login, it doesn’t redirect back to the directory page even though it is set in the URL to redirect. I have already removed the redirect page in eMember settings which I thought was overriding the URL redirect to the directory page.

    Is this something that can be done? Thanks.

    June 28, 2017 at 2:09 am #69511
    admin
    Keymaster

    The following documentation explains all the redirect options available in the plugin:

    https://www.tipsandtricks-hq.com/wordpress-membership/automatically-redirect-your-members-to-a-page-after-they-login-663

    There is an “inline login” option which lets you stay on the page after the login (even though you have configured after login redirection). Check that option to see if that works for you.

    There is also a way to override the after login redirect by adding a query parameter to the URL. Useful if you are linking to a protected page and want the user to stay on that page after the login. The following post has explanation on how to do that:

    https://support.tipsandtricks-hq.com/forums/topic/is-there-a-way-to-override-redirect-after-login

    June 28, 2017 at 2:24 am #69512
    karencheah
    Member

    Thanks for your suggestion. Unfortunately I’m not sure how I can use the inline login as the directory plugin asks for a URL to the login page. And when public click on the button in the directory, it will go to the login page. It is not quite a protected page. More like the directory detects that there’s no login, so will go to the login page that has been specified in the configuration. So it can’t be the inline login.

    I also can’t protect the directory listing page as it should be visible to public. If I could, that would probably work to bring up the inline login.

    I’ve had a look at the links above too. The first won’t work as it is not a static redirection. That worked ok to always redirect to the same page after login but not this situation. The second link with the URL is similar to what is required. The directory button actually put a redirect_to parameter after the login. But that redirect_to parameter doesn’t seem to take effect. That is the problem. Here’s the URL (with edited domain name).

    [http://somedomainname.com/member-login/?redirect_to=http%3A%2F%2Fsomedomainname.com%2Fbusiness-directory%2F%3Fwpbdp_view%3Dsubmit_listing]

    Should that work or not?

    June 29, 2017 at 1:22 am #69513
    admin
    Keymaster

    We can add an option so our plugin redirects to the URL specified in the “redirect_to” query parameter after the login operation. Will that help?

    June 29, 2017 at 1:26 am #69514
    karencheah
    Member

    If it’s not too difficult and will not affect how the other redirection in eMember works, that would be great! Otherwise, we can live with a workaround of getting members to login first before they are able to click on the submit listing. Thanks.

    June 30, 2017 at 1:46 am #69515
    admin
    Keymaster

    I had a look at the code and I think I should be able to add an option without upsetting any of the existing redirection. Give me a reminder if I forget about it.

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ