- This topic has 4 replies, 3 voices, and was last updated 4 years ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Automatic Direct to log in page
Tagged: login
I have put in a support request like 3 times with no answer. I am looking for the page to automatically go to the sign-in page instead of the “you must be logged in to view” page. The problem is that the “you must be logged in” page test sits under my sub-menu so it’s not clickable. Is there any way to do this?
This would help me as well. Waiting to see the answer. Thanks!!
Hi, There is no feature for this in the plugin unfortunately. There is a tweak you can apply to your site for this maybe:
https://simple-membership-plugin.com/auto-redirect-non-logged-in-users-protect-whole-site/
Yeah this is just for a specific set of pages. Is there any code I could put on the page to do this same thing?
It needs to be done early on the execution (before any page loading happens). Otherwise, the redirection won’t work. So the best practice is to use the approach explained in the above mentioned tweak. Perhaps, it can be further customized to add more logic in that code so it is only applicable for certain pages on your site.
In the future, I am going to try to add a feature so it can do redirection on the protected posts and pages only.