Codex tools: Log in
Updates the comment count for post(s).
When $do_deferred is false (is by default) and the comments have been set to be deferred, $post_id will be added to a queue, which will be updated at a later date and only updated once per post ID.
If the comments have not be set up to be deferred, then the post will be updated. When $do_deferred is set to true, then all previous deferred post IDs will be updated along with the current $post_id.
<?php wp_update_comment_count( $post_id, $do_deferred ) ?>
wp_update_comment_count() is located in