I am using the following code to output comment html:
$args = array ( 'post_id' => 805, 'status' => 'approve' ); $comments = get_comments( $args ); $comments_html = wp_list_comments( array( 'page' => 2, 'echo' => false, ), $comments);
error_log to output
$comments and it seems to be in descending order, which is correct as the setting for comment display in
Settings > Discussions is
"Comments should be displayed with the newer comments at the top of each page".
However, on running
wp_list_comments, the order gets messed up.
I have set 30 comments to be displayed per page. For products with less than 30 comments, the sorting seems to be by date in descending order. However, for products with more than 30 comments (and with comment pagination), the sorting order is messed up.
How to make this work with
wp_list_comments and comment pagination?