• I have a home page which gives an explanation of the site, but I don’t want my users hassled by it if they are already logged in.

    Is there a way to automatically take users to a different page if they go to the home page, if they are logged in?

    I found this code, and placed it into my functions.php file, but it didn’t work:

    add_action( 'init', 'redirect_users' );
    
    function redirect_users() {
        if( is_user_logged_in() && is_front_page() ) {
            wp_redirect( 'https://dev.indie-film.tv/activity/' );
            exit;
        }
    }

    Thanks.

  • The topic ‘Auto forward to different page if user is logged in’ is closed to new replies.