# How to get comments count in post?

**URL:** https://meta.discourse.org/t/how-to-get-comments-count-in-post/288059
**Category:** WordPress
**Created:** [December 9, 2023, 6:30am UTC](https://meta.discourse.org/t/how-to-get-comments-count-in-post/288059 "2023-12-09T06:30:15Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [December 9, 2023, 8:51am UTC](https://meta.discourse.org/t/how-to-get-comments-count-in-post/288059/2 "2023-12-09T08:51:28Z")

</div>

Hey there @Vladislav_Musílek,

The [WP Discourse](https://github.com/discourse/wp-discourse) plugin hooks into the filter for the standard Wordpress function [`get_comments_number`](https://developer.wordpress.org/reference/functions/get_comments_number). So you can show the number of Discourse comments on a post by echoing that in your template:

```plaintext
echo get_comments_number();`

```

For more on [WP Discourse](https://github.com/discourse/wp-discourse) comments check out

> [@Configure WP Discourse to display comments from Discourse](https://meta.discourse.org/t/configure-wp-discourse-to-display-comments-from-discourse/223493):
>
> You can use Discourse as a comments system for Wordpress. The Commenting features are dependent on the publishing features, so you need publishing to be set up for commenting to work. If you’ve set up publishing and are ready to set up commenting, watch this short video, or follow the instructions below. Next Step Once you’ve set up commenting, you may want to check out the following topics [Log in to Discourse with Wordpress (DiscourseConnect)](https://meta.discourse.org/t/wp-discourse-and-discourseconnect/223494)Instructions Setting up Commenting To have Di…

---

_[View the full topic](https://meta.discourse.org/t/how-to-get-comments-count-in-post/288059)._
