Comment section in discussion part of coursepress not working


In the discussion part of the courses it is not possible to comment on a started discussion.
Access is already granted!

thanks in advance

kind regards,

  • James Morris

    Hello Simon,

    I hope you are well today.

    CoursePress should display the native comment form for Discussions. Since I'm not seeing it, it could be an issue with your theme or a possible conflict.

    First, could you please run a plugin/theme conflict test as outlined in the following article? This will eliminate the possibility of a conflict with another plugin.

    Please let us know if this leads to a solution to your problem.

    Best regards,

    James Morris

  • Luís

    Hi Simon ,

    Hope you're doing well today!

    Regarding to the comments issue, this is related to the theme you are using (DIVI), I tested this on my install and I was able to replicate.

    You may need to create custom templates to CoursePress work properly with DIVI, however, I flagged the SLS team (our code experts :slight_smile: ) to investigate further and get their valuable feedback.

    Since this team deals with more advanced threads it may take them longer to reply.

    BTW: if a random person subscribes to a course, he directly see it as completed in the dashboard.. even though he is not the instructor.. How is this possible?

    In what course this is happening, I checked the one called "Change Management" and was not able to see the issues you mentioned.

    Cheers, Luís

  • Ash

    Hello Simon

    Would you please go to /wp-content/plugins/coursepress/2.0/include/coursepress/template/class-communication.php line no 182 and replace



    comment_form( array('label_submit' => esc_attr__( 'Post Comment', 'Divi' ), 'title_reply' => '<span>' . esc_attr__( 'Submit a Comment', 'Divi' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Divi' ), 'class_submit' => 'submit et_pb_button' ) );

    Let me know if it works for you.

    If it works, please note that, this changes will be lost in next update. So it's worth to note down this changes somewhere and apply again after your updates.

    Have a good day!


  • Ash

    Hello Simon

    Instead of my previous reply, replace with the following:

    $comments = get_comments(array(
                                    'post_id' => $discussion->ID,
                                    'number' => '2' ));
                            foreach( $comments as $comment )
                                    <article id="comment-<?php $comment->ID ?>" class="comment-body clearfix">
                                            <div class="comment_avatar">
                                                    <?php echo get_avatar( $comment->comment_author_email ); ?>
                                            <div class="comment_postinfo">
                                                    <span class="fn"><a href="" rel="external nofollow" class="url"><?php echo $comment->comment_author; ?></a></span> <span class="comment_date">on <?php echo date_i18n( get_option( 'date_format' ), strtotime( $comment->comment_date ) ); ?> <?php echo date_i18n( get_option( 'time_format' ), strtotime( $comment->comment_date ) ); ?></span>
                                            </div> <!-- .comment_postinfo -->
                                            <div class="comment_area">
                                                    <div class="comment-content clearfix">
                                                            <?php echo $comment->comment_content ?>
                                                    </div> <!-- end comment_area-->
                            comment_form( array('label_submit' => esc_attr__( 'Post Comment', 'Divi' ), 'title_reply' => '<span>' . esc_attr__( 'Submit a Comment', 'Divi' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Divi' ), 'class_submit' => 'submit et_pb_button' ) );

    This is the best we can do I think. You may need to style a bit. I am also marking this as a bug and reporting to the developer so that they can keep it in their to-do list.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.