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

Tento článek (nebo jeho část) je převzat z externího zdroje. Je tedy slušností jej uvést včetně případného autora.

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.

So if the user is not logged in and the page is not the home page then redirect the user to the home page, if you want a different page to direct them to,  change the parameters as below.

So above the as long as the page is not ‘comingsoon’ the non-logged in user will be redirected to it.