$current_post_ID, ); $comments = get_comments($args); $com_count = wp_count_comments( $current_post_ID ); if ($com_count->all == 0): echo "

Aucun commentaire

"; else: echo "

Commentaires:

"; endif; foreach ( $comments as $comment ) : $com_parent = $comment->comment_parent; if ($com_parent == 0): $com_ID = $comment->comment_ID; set_query_var('com_ID', $com_ID); get_template_part( 'template-parts/comment-wrapper'); $defaults = array( 'format' => 'tree', 'status' => 'all', 'hierarchical' => 'threaded', //'orderby' => 'comment_ID', 'orderby' => 'publish_date', 'order' => 'ASC', ); //TODO $children_com = $comment->get_children($defaults); foreach ($children_com as $child_com): $com_ID = $child_com->comment_ID; set_query_var('com_ID', $com_ID); get_template_part( 'template-parts/comment-wrapper'); endforeach; endif; endforeach; ?> "", 'fields' => array( //Author field 'author' => '', //Email Field 'email' => '

*Lire notre politique de confidentialité

', //URL Field 'url' => '', //Cookies 'cookies' => '' ), 'comment_field' => '

', 'title_reply' => __( '' ), 'title_reply_to' => __( '' ), 'title_reply_before' => '', 'title_reply_after' => '', 'comment_notes_before' => '', 'comment_notes_after' => '', ); comment_form( $args ); echo "


"; ?>