Viewing 1 replies (of 1 total)
  • Thread Starter Henry Wright

    (@henrywright)

    My solution was to do this:

    function tml_logout_page_redirect() {
        if ( Theme_My_Login::is_tml_page( 'logout' ) && ! is_user_logged_in() ) {
            wp_redirect( home_url() );
            exit;
        }
    }
    add_action( 'wp', 'tml_logout_page_redirect' );

    Note: hooking to template_redirect or init doesn’t work so I had to hook to wp instead.

Viewing 1 replies (of 1 total)
  • The topic ‘Log out page accessible when user is logged-out’ is closed to new replies.