• Resolved pdj1988

    (@pdj1988)


    Good morning guys

    Hope you are doing well?

    I am using the Forge Login plugin, together with the following code:

    // Custom Login URL*********************************************************
    function my_login_page( $login_url, $redirect ) {
    return site_url( ‘/login/?redirect_to=’ . $redirect );
    }
    add_filter( ‘login_url’, ‘my_login_page’, 10, 2 );

    It does a perfect job to redirect all users to the login page, however, if the user logs in successfully, the login page is reloaded. The top WordPress bar, however, does change, so the user is able to navigate to the site. This is not ideal as I want to redirect the user to the homepage (not dashboard) after successful login.

    If I remove the code snippet above, the process works perfectly fine, except that the custom login page is not used. Any advice would be appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pdj1988

    (@pdj1988)

    So after playing around with it the login form, it looks like after the user logs in the URL is not changed – it remains the same as before the login button was hit.

    • This reply was modified 3 years, 7 months ago by pdj1988.
    Thread Starter pdj1988

    (@pdj1988)

    Resolved the issue. I was making use of Elementor to build the login form. I added the correct redirects in “Login” section of the form and all is now well.

    Hi pdj,

    Do share! I am in a similar situation with my custom Login (although I used a PHP shortcode to insert the login form within Elementor). I would love to know how you solved this.

    I am currently stuck on getting Force Login to correctly redirect.

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘After succesfull login the login page reloads’ is closed to new replies.