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.
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.
- Wordpress Tips: hide a particular account from User List
- Capture network traffic on a VirtualBox VM
- Ransomware written in PHP attacks blogs and CMS?
- Rooting and installing Xposed Framework on Vodafone Smart Prime 6 (VF-895N)
- Wordpress tips: bulk update of permalinks and image paths