Restrict all courses to loggedin users only

Home Forums Legacy Support Support queries How-to & Troubleshooting Restrict all courses to loggedin users only

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #80950
    viikka
    Participant
    Hello, I would like to restrict all courses page so only logged in users could access it. I tried this solution: https://wplms.io/support/forums/topic/sitelock-settings/ But users couldn't login after that (with social login) and I got 500 error. After I deleted it, all works fine again. Is there any other solution.
    #81065
    H.K. Latiyan
    Participant
    Add the bellow code in your wplms-customizer.php file present in your wplms customizer plugin: add_action('bp_before_directory_course_page','custom_redirect_course_directory_page',1); function custom_redirect_course_directory_page(){   if(!is_user_logged_in()){     echo "<meta http-equiv=Refresh content=0;url=http://vibethemes.com>";   } } NOTE: Change the http://vibethemes.com to any page where you want to redirect non logged in users when they visit all courses page.   PS: This is a customization and customization in not the part of theme support. Please hire a freelancer for such customizations.
    #81084
    viikka
    Participant
    This reply has been marked as private.
    #81097
    viikka
    Participant
    Sorry replied to wrong thread :D
    #81129
    Can we close this topic?
    #81155
    viikka
    Participant
    Yes, thank you!
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Restrict all courses to loggedin users only’ is closed to new replies.