# Creating WP native comments

**URL:** <https://meta.discourse.org/t/creating-wp-native-comments/47557>\
**Category:** WordPress\
**Created:** [20. Juli 2016 um 17:05 UTC](https://meta.discourse.org/t/creating-wp-native-comments/47557 "2016-07-20T17:05:39Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [19. August 2016 um 15:50 UTC](https://meta.discourse.org/t/creating-wp-native-comments/47557/12 "2016-08-19T15:50:05Z")

</div>

A fix that will work for all cases requires changing the plugin a bit, but if you are not using native WordPress comments at all and are instead only using comments that are generated through Discourse, you can add something like this to your theme’s `functions.php` file.

I haven’t tested this, so if it’s not working let me know.

```php
function wp_discourse_comments_number() {
  $post = get_post();
  $count = intval( get_post_meta( $post->ID, 'discourse_comments_count', true ) );
  return $count;
}
add_filter( 'get_comments_number', 'wp_discourse_comments_number' );

```

---

_[View the full topic](https://meta.discourse.org/t/creating-wp-native-comments/47557)._
