# WP Discourse Won't Publish Private Post

**URL:** <https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166>\
**Category:** WordPress\
**Created:** [01.Сентябрь.2018 19:43:37 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:** 7

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [02.Сентябрь.2018 16:18:12 UTC](https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166/7 "2018-09-02T16:18:12Z")

</div>

I was assuming that your private posts were already using a custom post type, but it sounds as though they are just regular posts, set to ‘private’ here:

 ![08%20AM](https://global.discourse-cdn.com/meta/original/3X/f/6/f6cafbfd1cd9c3bd7a37ea475952cd6202328933.png)

There are two places in the wp-discourse code where the post\_status is checked to make sure that a post has the `published` status before publishing it to Discourse.

- [https://github.com/discourse/wp-discourse/blob/master/lib/discourse-publish.php#L77](https://github.com/discourse/wp-discourse/blob/master/lib/discourse-publish.php#L77)
- [https://github.com/discourse/wp-discourse/blob/master/lib/discourse-comment.php#L222](https://github.com/discourse/wp-discourse/blob/master/lib/discourse-comment.php#L222)

If you can wait until early next week, I’ll add a filter that lets you override this behaviour.

---

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