Popup redirect
-
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!
- The topic ‘Popup redirect’ is closed to new replies.