This plugin gives you the ability to call the 404.php template file or your own custom template file for specific paths where a user is not logged int
This plugin gives you the ability to call the 404.php template file or your own custom template file for specific paths where a user is not logged into WordPress and is not a specific role.
To use Path Access look under the "Settings" menu.
Your theme must have a 404.php file. However, if you want a more custom page you can create a file called access.php and users will be directed to that template instead, this template will set you HTTP Response to 403.
In the User Interface, to restrict access to a page or child pages you must:
You must have a 404.php template file or you can create your own template file and name it access.php. Some paths are blocked such as /wp-admin and /wp-login.php for your safety. You can also specify which roles may access the restricted pages by checking the boxes of the role you want to enable access for.