• Resolved mif

    (@mifundum)


    Hi, I love using TML for redirecting and creating my own version of the loginpage. However, if I go to the TML login page after being logged in it will still display the login form. Can I be redirected to the chosen page in stead of getting this login form again (I’m already logged in.. it’s rather confusing).

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Jeff Farthing

    (@jfarthing84)

    
    function redirect_login_when_logged_in() {
        if ( tml_is_action( 'login' ) && is_user_logged_in() ) {
            wp_redirect( home_url( '/' ) );
            exit;
        }
    }
    add_action( 'template_redirect', 'redirect_login_when_logged_in' );
    
Viewing 1 replies (of 1 total)
  • The topic ‘Loginpage keeps displaying login form when logged in’ is closed to new replies.