Return the number of comments

Posted by Prem Tiwari | Updated on

Use the below example code in your theme’s functions.php file to return the number of comments. This is like count_user_posts(), but returns the number of comments instead:

More: Count User’s posts (including custom post types) or comments:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers