Created
December 9, 2014 21:26
-
-
Save infn8/ceee9d3593b38fb35e71 to your computer and use it in GitHub Desktop.
Wordpress Force Login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!is_user_logged_in()) { | |
wp_login_form(); | |
wp_die('you need to login' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this to your header.php after: