- This topic has 3 replies, 2 voices, and was last updated 5 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Redirect non member to page
Tagged: redirect
Right now I am using custom message to non logged in users that try to access protected posts/pages.
Insted of custom message, Can I redirect them to ‘Join Us’ page or any page?
Thanks!
Hi, please read the following documentation.
https://simple-membership-plugin.com/simple-membership-custom-messages-addon/
This should help you with your question.
Thank you
I am already using custom message.
What I would prefer to do automatic redirection to a page instead of showing custom message.
Is it possible?
Thanks!
Hi, unfortunately we don’t have an option for what you are looking for.
However, we do have the following documentation. But I think the above is not what you are looking for.
https://simple-membership-plugin.com/auto-redirect-non-logged-in-users-protect-whole-site/
Or if you are a developer, you might like to try the following code snippet. This is an example of how you can check if the logged-in member has access to a particular post (given the post ID)
global $post;
$access_ctrl = SwpmAccessControl::get_instance();
if ($access_ctrl->can_i_read_post($post)){
//This user can read the specified post
//Add your custom code that does something
}
Kind regards