WordPress的comment form和comment list


Updated on: August 9, 2020 in Office by

<div class="container comments">
            <?php comment_form(  ) ?>
        
        </div>

        <div class="container comment-list">
            <ol class="commentlist">
                <?php 
                    $comments = get_comments( array(
                        'post_id'  => $post->ID,
                        'status'  => 'approve'
                    ) );
                    wp_list_comments( array(
                        'per_page'  => 10,
                        'reverse_top_level'  => false,

                    ),$comments );
                
                
                ?>
            
            </ol>
        
        </div>