# WP Discourse: custom filters for discourse\_replies\_html and discourse\_no\_replies\_html

**URL:** <https://meta.discourse.org/t/wp-discourse-custom-filters-for-discourse-replies-html-and-discourse-no-replies-html/106306>\
**Category:** WordPress\
**Created:** [11.Январь.2019 18:42:53 UTC](https://meta.discourse.org/t/wp-discourse-custom-filters-for-discourse-replies-html-and-discourse-no-replies-html/106306 "2019-01-11T18:42:53Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Kayla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kayla/32/128523_2.png) [@Kayla](https://meta.discourse.org/u/Kayla)\
**Post date:** [11.Январь.2019 18:42:53 UTC](https://meta.discourse.org/t/wp-discourse-custom-filters-for-discourse-replies-html-and-discourse-no-replies-html/106306/1 "2019-01-11T18:42:53Z")

</div>

[WP Discourse](https://github.com/discourse/wp-discourse) Version 1.8.2: Instead of my custom filters I’m getting “Comments are not currently available for this post.” inside a div that includes the class “discourse-no-connection-notice.” This is regardless of whether the post is using the Classic or Block Editor. The posts do publish to Discourse.

Thinking with the changes needed to be made to the discourse\_publish\_format\_html filter ([WP Discourse: advanced custom filter for discourse\_publish\_format\_html - #9 by simon](https://meta.discourse.org/t/wp-discourse-advanced-custom-filter-for-discourse-publish-format-html/106059/9)), I changed both my replies functions/filters like so:

```plaintext
function cosmos_custom_discourse_replies( $input, $post_id ) {
    ob_start();
    ?>
    custom output here
    <?php
    $output = ob_get_clean();
    return $output;
}
add_filter( 'discourse_replies_html', 'cosmos_custom_discourse_replies', 10, 2 );

```

Didn’t help. Unlinking and relinking to the existing topic results in an empty div with the class “wpdc-comments-loading” (at least in the context of no replies in my playing with it). Adding a comment on Discourse didn’t populate over to WP, still the same empty div. Removing my custom filters entirely does show default “Start the conversation at \_.” Any tips on how to get my old custom filters working with the newest version?

---

_[View the full topic](https://meta.discourse.org/t/wp-discourse-custom-filters-for-discourse-replies-html-and-discourse-no-replies-html/106306)._
