Redirect all pages to a ‘Coming Soon’ Page in WordPress

Wordpress Coming Soon

You can redirect all your WordPress pages to a designated Coming Soon page for all non-logged in users with the template_redirect action hook whilst leaving all pages visible to logged in users. add_action( ‘template_redirect’, ‘themeprefix_coming_soon’ ); function themeprefix_coming_soon() { if( !is_user_logged_in() && ! is_front_page() || is_home() ){ wp_redirect( site_url() ); exit(); } } So if…

Read More