Last active
August 29, 2015 14:08
-
-
Save lunaroja/26270646bd39921b37a4 to your computer and use it in GitHub Desktop.
WP: Temp redirect non logged in users to other URL.
This file contains hidden or 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 ( | |
| !in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) | |
| && !is_admin() | |
| && !is_user_logged_in() | |
| ) { | |
| wp_redirect( 'http://other-temp-site.com/', 302 ); exit; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment