Viewing 2 posts - 1 through 2 (of 2 total)
  • Question

    #43120
    @kahunaburger

    How do I enable comments on courses?

    Answers

    #43138
    @vapvarun

    Hey @kahunaburger , By default sensei have not added comment support for the courses.
    You will need to add support for comment for course first
    add below function to functions.php

    
    function course_comments_init() {
    	add_post_type_support( 'course', 'comments' );
    }
    add_action('init', 'course_comments_init');
    

    and single course template also need to be modified to display the comment loop and comment input box

    
     <?php
                        // If comments are open or we have at least one comment, load up the comment template
                        if ( comments_open() || get_comments_number() ) :
                            comments_template();
                        endif;
                    ?>
    

    Regards
    Varun Dubey

Viewing 2 posts - 1 through 2 (of 2 total)
  • The question ‘Course Comments’ is closed to new replies.