# How does Discourse replace WP comments exactly?

**URL:** <https://meta.discourse.org/t/how-does-discourse-replace-wp-comments-exactly/157969>\
**Category:** WordPress\
**Created:** [July 16, 2020, 7:41pm UTC](https://meta.discourse.org/t/how-does-discourse-replace-wp-comments-exactly/157969 "2020-07-16T19:41:18Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [July 24, 2020, 4:32am UTC](https://meta.discourse.org/t/how-does-discourse-replace-wp-comments-exactly/157969/6 "2020-07-24T04:32:37Z")

</div>

> [@simon](#):
>
> The Toolset plugin is probably hooking into that filter with a lower priority to prevent the comment template from being loaded for protected pages.

I got in touch with Toolset about this and I was mistaken about the expected behavior. The Toolset Access plugin doesn’t hook into the comments template _at all._ Hiding comments on restricted content requires custom code to hook into their toolset\_access\_api\_get\_post\_permissions filter to suppress/allow the rendering of the comments template at the theme level. I apologize that I did not realize their content restriction is quite literally about the content template itself. 🤦‍♀️

---

_[View the full topic](https://meta.discourse.org/t/how-does-discourse-replace-wp-comments-exactly/157969)._
