Back to Top

How to get comment count outside post in WordPress

Get number of comments of a post

In this post, we will see how to get a number of comments in WordPress.You will be able to count comments of a post in WordPress.WordPress Provides a very fantastic commenting system that allows readers to add comments to the blog.

Comment section plays vital role to the web blog and its a kind of review of visitors so equally important to post.Almost Every blog allow visitors to post comments about the content. This gives readers the opportunity to interact with the writer of the blog and also for making the whole enterprise interactive. With the visitors comment, you can collect reviews of your content.

Today I am going to share function which will provide a count of comments of a particular post in WordPress.

Explanation:

Here in this function, you need to pass post_id, the sentence for no comment,1 comment and more comments which will check and return the count of the comments.You can add this function to the functions.php file of active theme or where you want to use.

Hope you find this function useful for you. will wait for your responses.

Share:
Share on Facebook1

Share on LinkedIn0Tweet about this on TwitterShare on Google+0Buffer this pageDigg thisShare on Reddit0

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular Posts

How To Turn On Output Buffering

Posted on 5 years ago

Bhumi

How to use jQuery UI tabs in a WordPress?

Posted on 4 years ago

Bhumi

How to change Quotes in WordPress

Posted on 4 years ago

Bhumi

How to display XML content with PHP

Posted on 4 years ago

Bhumi

How to Use the HTML5 Full-Screen API

Updated 17 years ago

Bhumi

What are Lambdas and Closures in PHP?

Updated 17 years ago

Bhumi

MySQL REGEXP Operator

Updated 17 years ago

Bhumi

HTML5 Geolocation API with Example

Updated 17 years ago

Bhumi

Overview of Views in MySQL

Updated 17 years ago

Bhumi

The Reader’s Poll – June 2015

Posted on 2 years ago

Bhumi

The Reader’s Poll – August 2014

Posted on 2 years ago

Bhumi

The Reader’s Poll – June 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – May 2014

Posted on 3 years ago

Bhumi

The Readers’ Poll – August 2013

Posted on 3 years ago

Bhumi