MemberPress Courses will have comments disabled on all courses and lessons by default.
This document will show you how to allow comments on individual courses and lessons and for all of your lessons in bulk.
Enabling Comments on Individual Lessons
Comments are not displayed in courses and lessons by default but you can display them following these steps:
- Go to MemberPress > Settings page, click the Courses tab, check the “Show Comments Settings on Course and Lesson Pages” option and save it
- Once it's done each course and lesson will have a Discussion section with an “Allow comments” option
- To display comments on a specific course or lesson you will need to check the “Allow comments” checkbox and save the course/lesson. Here is the screenshot of what the comment form looks like:
Enabling Comments on All Lessons
To display comments on all lessons without the need to check the “Allow Comments” option manually for each lesson you could put the following code snippet to the WPCode plugin (please check this article for details:Â How to add custom code snippets in WPCode), or if you're using a child theme, then the functions.php file should work as well.
add_filter('comments_open', function($open, $post_id) { $post = get_post( $post_id ); if('mpcs-lesson' == $post->post_type) $open = true; return $open; }, 10, 2);