Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: [Resolved] I want to redirect all the logged out users to login page

@henrywright

Moderator

Regarding the redirect, I’m not sure if there is a plugin but you can add this to your theme’s functions.php file:

function my_redirecter() {
    if ( ! is_user_logged_in() ) {
        wp_redirect( home_url() . '/login/' );
        exit();
    }
}
add_action( 'init', 'my_redirecter' );
Skip to toolbar