Restrict Website, But Login and Register Page
I want my my entire WordPress site to be restricted to visitors, but I want the register and login page to be accessible (not restricted) to the visitors
Since my website is a members-only website, I want to restrict it's access so that visitors only see 2 pages, the login page and the register page.
I have tried multiple plugins to do exactly that but unfortunately for me, I haven't been able to find the right one. Some plugins redirect the entire website to one page while other plugins require custom redirection settings for each page to be separately added.
What I want:-
- Restrict entire WordPress website to visitors by redirection.
- Do not restrict 2 pages, Login Page and Registration Page.
- Redirect Users to Login Page and/or Register Page.
There is an option in my Login Page to view the Register Page.
I want both of these pages to be accessible to the visitor and the rest of the website to be inaccessible.