Restrict all site to only logged in users, and redirect to a custom Login page
Sometimes, you would want to lock the site completely, and allow it only to registered users. Also, you may want to redirect the front-end login requests to a custom WP Page with a custom login form, other than going to the default /wp-login.php page, like below: That can be easily achieved by writing a simple function…

