• Resolved Josh Levinson

    (@joshlevinson)


    Cole,

    Would you consider adding a simple option for developers so we can go ahead and begin altering the redirect url your plugin uses? Currently I am having to alter your plugin after every update. If you would change the plugin to use something like

    apply_filters('wpml_redirect_to',$_SERVER['REQUEST_URI'])

    instead of just $_SERVER['REQUEST_URI'] at line 84 of /includes/class-wp-modal-login.php, I could begin using this filter now, and in the future you could use the same filter to add an admin setting for non-coders.

    Thanks!

    https://www.ads-software.com/extend/plugins/wp-modal-login/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Cole Geissinger

    (@brainfestation)

    Hi Josh, thanks for the suggestion. I’ll add this to the next update which I’ll be rolling out soon.

    How does this work?

    Do I add:

    apply_filters(‘wpml_redirect_to’,$_SERVER[‘https://www.myredirecturl.com’%5D)

    to my fuctions.php to redirect users after logging in?

    Thread Starter Josh Levinson

    (@joshlevinson)

    Close but no cigar ??

    add_filter('wpml_redirect_to','my_wpml_redirect');
    function my_wpml_redirect(){
    return 'https://www.myredirecturl.com';
    }

    That is the most compatible way to do it.

    Woop! Thank you Josh ??

    webdesigninghisar

    (@webdesigninghisar)

    thanxxxxx Josh helpful code for all user to redirect the url after login nice job thanxxxxxxx

    M. Dost

    (@m-dost)

    Could you explain it a bit more detailed to me. Because when I add your code

    add_filter(‘wpml_redirect_to’,’my_wpml_redirect’);
    function my_wpml_redirect(){
    return ‘https://www.myredirecturl.com’;
    }

    to functions.php it doesn’t work.

    M. Dost

    (@m-dost)

    If someone has a little knowledge of using these codes and explain it a bit, it would be, could be and should be very usefull…

    Plugin Author Cole Geissinger

    (@brainfestation)

    Hi M. Dost, can you provide more details? What happens exactly when you login with this code?

    Could you also provide a snippet of the code in your functions.php? The code above should do it, nothing else to it, so there may be something else at play here.

    Was this added to the latest version yet? And is there a way to redirect based on user role? Because that’d be hugely awesome.

    AWesome thank you so much for this. It really helped.

    got it, thanks for that

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Redirect’ is closed to new replies.