Creating WP native comments

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.

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' );
2 Mi Piace