• Resolved fcvolunteer

    (@fcvolunteer)


    I’m using Popup Maker to ask visitors whether they’re returning or new visitors. If they click that they’re returning I’ve created a redirect (with your help last year :-)) in my functions.php file in my child theme’s which redirects visitors to a certain page once they successfully log in. It’s working fine.

    Now I’d like to add an additional function for a link in another popup that also prompts them to login before continuing but once they login they’re being redirected to the same page as the other popup. How can I add another function that won’t interfere with the existing function and still get my visitors to the alternate landing page if they’ve reached the login page from a different “referring” page?

    Here’s my existing function that’s working for the first redirect:

    function login_redirect( $redirect_to, $request, $user ){
        return home_url('/my-page');
    }
    add_filter( 'login_redirect', 'login_redirect', 10, 3 );

    Is there something I could add or tweak so that it “pays attention” to how they got to the login page and then sends them somewhere else?

    Hope this makes sense. :-/

    Thanks!

    • This topic was modified 8 years, 6 months ago by fcvolunteer.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @fcvolunteer – This may be a better question for the general WordPress forums. I am not completely sure how you could pass the page that they came from before logging in.

    To be clear where are they logging in at? In a popup form or at the wp-login.php link? If the link then possibly you can modify how the login link is generated to make it do this automatically.

    Thread Starter fcvolunteer

    (@fcvolunteer)

    Thanks for the reply. I did ask in the general WP forums but got no response. The visitors are logging in using a my theme’s login page so I’ve contacted my theme’s authors.

    Thanks for they idea!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Popup redirect’ is closed to new replies.