Forum Replies Created
-
Author
-
hamsar
ParticipantHi ,
It works but now its not redirecting users to the registration page rather they are redirected to the membership level page. I want non logged to be redirected to the registration page. thanks
Thanks
hamsar
ParticipantHi LAURA,
I m using this snippet and its blocking the post to be viewed by non logged users. But I want to allow post to be viewed by non logged users. How can i make it happen. Thanks
/* Restrict guests only to those pages.*/
function sq7R_kleo_restrictions_guest_restrict() {
$allowedpages= array(‘register’,’activate’,’Home’,’blog’,’reasons-to-join’,’privacy-policy’,’about-us’,’terms-of-service’,’contact’);
if( !is_user_logged_in() && !is_page($allowedpages)) {
wp_redirect(site_url( ‘/register’) );
}
}
add_action(‘template_redirect’, ‘sq7R_kleo_restrictions_guest_restrict’);hamsar
ParticipantHi again,
I m using a snippet which blocks non members to access certain pages. However its also blocking blog posts. I did allow the blog page, however blog posts are not accessible to non members.
Thanks
AB
June 25, 2018 at 15:39 in reply to: Non logged users restriction snippet blocking user activation link. #201865hamsar
ParticipantNot marked as solutionJune 23, 2018 at 18:40 in reply to: Non logged users restriction snippet blocking user activation link. #201675hamsar
ParticipantNot marked as solutionJune 23, 2018 at 13:57 in reply to: Redirect visitor to login or register page if user not logged in and restrict their access #201629hamsar
ParticipantNot marked as solutionJune 23, 2018 at 00:36 in reply to: Redirect visitor to login or register page if user not logged in and restrict their access #201601hamsar
ParticipantNot marked as solutionJune 22, 2018 at 21:03 in reply to: Redirect visitor to login or register page if user not logged in and restrict their access #201587hamsar
ParticipantNot marked as solutionJune 21, 2018 at 20:10 in reply to: Redirect visitor to login or register page if user not logged in and restrict their access #201477hamsar
ParticipantNot marked as solutionJune 21, 2018 at 20:04 in reply to: Redirect visitor to login or register page if user not logged in and restrict their access #201476hamsar
ParticipantNot marked as solutionJune 18, 2018 at 00:31 in reply to: Redirect visitor to login or register page if user not logged in and restrict their access #201111hamsar
ParticipantNot marked as solutionJune 17, 2018 at 19:23 in reply to: Redirect visitor to login or register page if user not logged in and restrict their access #201054hamsar
ParticipantNot marked as solutionJune 17, 2018 at 19:21 in reply to: Redirect visitor to login or register page if user not logged in and restrict their access #201053hamsar
ParticipantNot marked as solutionJune 16, 2018 at 18:32 in reply to: Restrict non members from accessing buddy press, user profiles #200966hamsar
ParticipantNot marked as solutionJune 16, 2018 at 17:58 in reply to: Restrict non members from accessing buddy press, user profiles #200964hamsar
ParticipantNot marked as solutionJune 16, 2018 at 17:55 in reply to: Restrict non members from accessing buddy press, user profiles #200963hamsar
ParticipantNot marked as solutionJune 16, 2018 at 17:54 in reply to: Restrict non members from accessing buddy press, user profiles #200962hamsar
ParticipantNot marked as solutionJune 16, 2018 at 17:46 in reply to: Restrict non members from accessing buddy press, user profiles #200957hamsar
ParticipantNot marked as solutionJune 16, 2018 at 17:41 in reply to: Restrict non members from accessing buddy press, user profiles #200956hamsar
ParticipantNot marked as solutionJune 16, 2018 at 17:40 in reply to: Restrict non members from accessing buddy press, user profiles #200955hamsar
ParticipantNot marked as solutionJune 16, 2018 at 16:58 in reply to: Restrict non members from accessing buddy press, user profiles #200942hamsar
ParticipantNot marked as solutionJune 16, 2018 at 16:55 in reply to: Restrict non members from accessing buddy press, user profiles #200941hamsar
ParticipantNot marked as solution -
AuthorPosts