Site Lock with Redirect to Register Page for non logged in

Home Forums Legacy Support Support queries How-to & Troubleshooting Site Lock with Redirect to Register Page for non logged in

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #146817
    bam3473
    Spectator
    This page shows how to do a site lock with exclusions for certain pages.   https://wplms.io/support/forums/topic/site-lock-but-enable-access-to-specific-pages/   However, when a user clicks on a link that is for logged in users, it just redirects.  How can we get that to go to the register page or to some other page than a refresh? Yes its is possible. Add the below code in your wplms-customizer.php file present in wp-admin->plugins->editor->select wplms customizer plugin->wplms-customizer.php file: add_filter('wplms_site_lock_exclusions','exclude_custom_pages_from_site_lock'); function exclude_custom_pages_from_site_lock($pages){ $pages[] = 23; $pages[] = 24; $pages[] = 25; return $pages; } We used this:  
    #146852
    H.K. Latiyan
    Participant
    Hi, Can you please share the pages url and the admin credentials also to check this on your website. PS: Please mark your reply as private while sharing the credentials.
    #146885
    bam3473
    Spectator
    This reply has been marked as private.
    #147034
    H.K. Latiyan
    Participant
    Hi, I checked your website and found out that you have not set the site lock properly on your website. I guess you have not referred to our site lock tutorial: https://www.youtube.com/watch?v=pwxYL080oFQ The link of the tutorial is already provided in the option panel, refer: http://prntscr.com/igp57k You need to set the homepage as the register page and set the page template as site lock. Please refer the tutorial above and follow the steps.
    #147125
    bam3473
    Spectator
    This reply has been marked as private.
    #147210
    H.K. Latiyan
    Participant
    Hi, I understand your issue now. However this is not possible as of now, we'll have to add a filter in the code to achieve this. We'll add this in the next update.
    #147355
    bam3473
    Spectator
    Are there any steps we can take now to get the required behavior?  Is there a way we can send a person to the login page when they click on a link that requires a logged in user?
    #147464
    H.K. Latiyan
    Participant
    Hi, Right now there is no way, but after the next update I can provide you a 2 -3 line of code to achieve this.
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Site Lock with Redirect to Register Page for non logged in’ is closed to new replies.