# WP Discourse Won't Publish Private Post

**URL:** <https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166>\
**Category:** WordPress\
**Created:** [September 1, 2018, 7:43pm UTC](https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166 "2018-09-01T19:43:37Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)\
**Post date:** [March 26, 2025, 12:06pm UTC](https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166/14 "2025-03-26T12:06:08Z")

</div>

Edit: Never mind, hook still works!

> [@WP Discourse Won't Publish Private Post](https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166/9):
>
> I have added a wpdc\_publish\_private\_post filter hook that you can use to publish private posts to Discourse. The filter passes up to two parameters to a function that you hook into it. The parameters are $publish (set to false) and $post\_id, the WordPress post id. If you wish to allow all private posts to be published to Discourse, you can add something like this to a plugin, or your theme’s functions.php file. You can name your hook functions however you choose, just be sure that the name is u…

It would be great if this part could be added to the documentation of the plugin

---

_[View the full topic](https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166)._
