WordPress.org

Ready to get started?Download WordPress

Forums

WP Modal Login
[resolved] Redirect (12 posts)

  1. Josh Levinson
    Member
    Posted 1 year ago #

    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!

    http://wordpress.org/extend/plugins/wp-modal-login/

  2. Cole Geissinger
    Member
    Plugin Author

    Posted 1 year ago #

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

  3. mbenari
    Member
    Posted 1 year ago #

    How does this work?

    Do I add:

    apply_filters('wpml_redirect_to',$_SERVER['http://www.myredirecturl.com'])

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

  4. Josh Levinson
    Member
    Posted 1 year ago #

    Close but no cigar :)

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

    That is the most compatible way to do it.

  5. mbenari
    Member
    Posted 1 year ago #

    Woop! Thank you Josh :)

  6. webdesigninghisar
    Member
    Posted 9 months ago #

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

  7. M. Dost
    Member
    Posted 9 months ago #

    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 'http://www.myredirecturl.com';
    }
    to functions.php it doesn't work.

  8. M. Dost
    Member
    Posted 9 months ago #

    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...

  9. Cole Geissinger
    Member
    Plugin Author

    Posted 9 months ago #

    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.

  10. primasilva
    Member
    Posted 8 months ago #

    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.

  11. askmediy
    Member
    Posted 8 months ago #

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

  12. samiotis
    Member
    Posted 8 months ago #

    got it, thanks for that

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic