By Editorial Staff in WordPress Tags: Code, Code Snippet, Snippet, WordPress, WordPress Snippet
Adding the following snippet in your theme’s functions.php file will let you redirect if you are not logged in WordPress.
| if(!is_user_logged_in() && $pagenow != 'wp-login.php') { wp_redirect( '/comingsoon.html', 302 ); } |