Hide public page from logged in users?

You can create a page template to check if user is loggedin. And if it does then redirect user to website homepage (configurable), otherwise show page content.

This is the simple condition you can use to check if user is loggedin.

<?php
    if ( is_user_logged_in() ) {

        wp_redirect( home_url( "https://wordpress.stackexchange.com/" ) );
        exit;

    } else {

        the_content();

    }
?>

tech