[英]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;在wordpress中,在前端,在课程页面的Tutor LMS中,我们如何才能有一个用户可以评论的部分(在底部); like in Learpress?
就像在 Learpress 中一样?
Please help!请帮忙!
By default, the Tutor LMS doesn't have a comment form for the course details page.默认情况下,Tutor LMS 没有课程详细信息页面的评论表单。 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,打开这个文件/tutor/classes/Post_types.php,
-In this file, you will find this code array( 'title', 'editor', 'thumbnail', 'excerpt', 'author'),
-在这个文件中,你会发现这个代码
array( 'title', 'editor', 'thumbnail', 'excerpt', 'author'),
-You need to replace the code with this code array( 'title', 'editor', 'thumbnail', 'excerpt', 'author', 'comments'),
- 你需要用这个代码
array( 'title', 'editor', 'thumbnail', 'excerpt', 'author', 'comments'),
Now you need to edit this file /tutor/templates/single/course/instructors.php现在你需要编辑这个文件 /tutor/templates/single/course/instructors.php
-In this file before this code <?php } do_action( 'tutor_course/single/enrolled/after/instructors' );
- 在此代码之前的文件中
<?php } do_action( 'tutor_course/single/enrolled/after/instructors' );
-You need to add this code <?php comments_template( '', true ); ?>
- 您需要添加此代码
<?php comments_template( '', true ); ?>
<?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
要启用评论,请检查提供的屏幕截图https://prnt.sc/26q0usm
Thank you谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.