'User comments on course page on frontend in Tutor LMS
In wordpress, on the frontend, in Tutor LMS on a course page, how can we have a section(at the bottom) where users can comment; like in Learpress?
Please help!
Solution 1:[1]
By default, the Tutor LMS doesn’t have a comment form for the course details page. The comments is removed based on majority customer’s feedback because this is not a blog post page but a product page. However, you still can add a comment form very easily just by editing two files and following the steps:
Open this file /tutor/classes/Post_types.php,
-In this file, you will find this code
array( 'title', 'editor', 'thumbnail', 'excerpt', 'author'),-You need to replace the code with this code
array( 'title', 'editor', 'thumbnail', 'excerpt', 'author', 'comments'),Now you need to edit this file /tutor/templates/single/course/instructors.php
-In this file before this code
<?php } do_action( 'tutor_course/single/enrolled/after/instructors' );-You need to add this code
<?php comments_template( '', true ); ?>Now you need to edit your course and enable comments for the course. to enable comments check the provided screenshot https://prnt.sc/26q0usm
Thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Md Rashed Hossain |
