Hide Private forums on courses

Home Forums Legacy Support Support queries Setup issues Hide Private forums on courses

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45747
    masuccijr
    Spectator
    Hi team, How to hide the private forums on courses for visitors. For exemple, here is one of the courses https://e-signos.fr/nos-formations/mind-mapping-1/ and on the left there is the option to go to forum, but the forum is private so when a visitor clic on the forum he found a blank page. I search the solution on wp-admin / LMS / Settings, but i don't find it. Could you help me ? Thanks
    #45767
    I just got this request from a client, luckily there's an easy way to accomplish this. Go to your child theme's functions and just drop this little snippet. add_filter('wplms_course_nav_menu','cdctps_remove_course_forum',9,1); function cdctps_remove_course_forum($defaults){ if (!wplms_user_course_check($user_id,$course_id)){ // Check's wether or not the user is enrolled $key = 'forum'; //You may need to change it accordding your language unset($defaults[$key]); //Remove forum tab for non-enrolled users } return $defaults; } If you're not using a child theme (and you really should), you may consider creating a site-specific plugin.
    #45807
    H.K. Latiyan
    Participant
    @urdek: thanks for the code. @masuccijr:Yes you can use the above code for hiding the forums.
    #45858
    masuccijr
    Spectator
    Thanks Urdek, I not have a Child Theme, but i think i will go to create it and try your solution.
    #45874
    H.K. Latiyan
    Participant
    You can also paste the code in wplms-customizer.php file present in your wplms customizer plugin.
    #46702
    masuccijr
    Spectator
    Thanks, that's works on wplms customizer.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Hide Private forums on courses’ is closed to new replies.