Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // add a page called Coming Soon and adjust it to your needs
- // your url should look like this: domain.com/coming-soon/
- // then simply paste this into you themes functions.php
- add_action( 'init', function()
- {
- if( ! is_user_logged_in() )
- {
- if ( isset( $_SERVER['REQUEST_URI'] )
- && ( '/coming-soon/' == $_SERVER['REQUEST_URI']
- || '/wp-admin/' == $_SERVER['REQUEST_URI']
- || false !== strpos( $_SERVER['REQUEST_URI'], 'wp-login.php' ) ) ) return;
- wp_redirect( '/coming-soon/' );
- exit;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement