/ Published in: PHP
Place at the top of your header.php to redirect visitors who are not logged-in to the Wordpress admin. I use this to redirect to a simple HTML 'coming soon' page while sites are in development.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if (!is_user_logged_in()) { wp_redirect('http://mydomain.com/coming-soon.html', 302); } ?>