How to show the total number of comments in WordPress
Adding below code snippet to your WordPress theme will display the total number of approved comments.
<?php $number_of_comments = get_comment_count(); $number_of_commentsm = $number_of_comments['approved']; //approved, echo $number_of_comments; ?> |