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.
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.
This reply has been marked as private.
Sorry replied to wrong thread :D