We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d676a07 commit 4c2df28Copy full SHA for 4c2df28
src/wp-includes/comment.php
@@ -2872,7 +2872,7 @@ function wp_update_comment_count_now( $post_id ) {
2872
$new = apply_filters( 'pre_wp_update_comment_count_now', null, $old, $post_id );
2873
2874
if ( is_null( $new ) ) {
2875
- $new = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1'", $post_id ) );
+ $new = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND comment_type != 'note'", $post_id ) );
2876
} else {
2877
$new = (int) $new;
2878
}
0 commit comments