Support » Plugin: WP-Members Membership Plugin » Redirect in Login Widget not working

  • Resolved w3thax



    I am using WP 4.7.2 with the latest WP Members update.

    I have a login page which displays the WP Members Login Widget.

    After submitting the form the form is reset, there is no redirect performed. I have to reload the page to see that the login was successful and the form disappears.

    Any ideas what I can do to repair that?

    Thanks in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Chad Butler


    Any ideas what I can do to repair that?

    Not sure what to tell you in this case. The feature is functional, so there’s nothing to repair. Certainly other factors can come into play – other plugins, theme, server.

    You could try doing the redirect using the wpmem_login_redirect filter.

    Thanks, that helped.


    I think I have the same problem, but I can’t handle the plugin with code
    Please, can you help me how to fix it on this way step by step?


    Actually I found in my functions.php of the theme the code, that Chad was talking about in some older version. The redirect url in this code was wrong and did redirect to the same page as the login page. This was probably an old setting of the last webmaster. I updated it with the new URL. This worked. Than I tried to remove this completely and than it worked out of the box.

    If you want to try the setting Chad mentioned, do the following:
    1) Go to Design => Editor => select the functions.php
    2) At the top, under “<?php” add this code:

    add_filter( 'wpmem_login_redirect', 'my_login_redirect', 10, 2 );
    function my_login_redirect( $redirect_to, $user_id ) {
        // return the url that the login should redirect to
        return '';

    3) Edit the return URL to the URL you want to redirect the user.
    4) Save your changes at the bottom of the page.

    Get back to @cbutlerjr or me when it doesn’t work afterwards. 😉


    Thank you very much w3thax!
    I update you on my progress


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirect in Login Widget not working’ is closed to new replies.