Wordpress tips: courtesy page for anonymous users without plugins



It may happen that you have need to make a wordpress site accessible only to registered users or administrators (for example, during an update).

Let’s see how to make a courtesy page for anonymous users without using any plugins.

Wordpress

It is enough to add on top of the file header.php of the active theme the following code snippet:

In this way the anonymous users will see only a courtesy message, while the logged users will display all pages of the site.


Published: May 26 2015