# Should comments webhook update count after deleting posts/comments?

**URL:** <https://meta.discourse.org/t/should-comments-webhook-update-count-after-deleting-posts-comments/336621>\
**Category:** WordPress\
**Created:** [November 17, 2024, 6:23pm UTC](https://meta.discourse.org/t/should-comments-webhook-update-count-after-deleting-posts-comments/336621 "2024-11-17T18:23:21Z")\
**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:** [November 18, 2024, 8:35am UTC](https://meta.discourse.org/t/should-comments-webhook-update-count-after-deleting-posts-comments/336621/2 "2024-11-18T08:35:43Z")

</div>

I’m trying to understand how you’ve set this up. Please correct me if I’m wrong:

1. You use Publishing and [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) feature sets of the plugin.
2. You do (not) have “Enable Discourse Comments” enabled (?: this is unclear)
3. You have the “Sync Comment Data” webhook enabled.
4. You have added a custom button at the bottom of the Wordpress posts linked to Discourse that displays the count of Discourse posts on a topic. It uses the `get_comments_number` Wordpress filter.
5. You want the count to be updated when posts in the linked topic are deleted.

Is that right? What else have you set up (or not)?

---

_[View the full topic](https://meta.discourse.org/t/should-comments-webhook-update-count-after-deleting-posts-comments/336621)._
