# WP Discourse が非公開投稿を公開しません

**URL:** <https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166>\
**Category:** WordPress\
**Created:** [2018 年 9 月 1 日午後 7:43 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:** 2

<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:** [2018 年 9 月 1 日午後 8:11 UTC](https://meta.discourse.org/t/wp-discourse-wont-publish-private-post/96166/2 "2018-09-01T20:11:58Z")

</div>

Do your private posts have a post type? If so, the reason the post type isn’t showing up in the **Post Types to Publish** setting (found on the plugin’s Publishing tab) is probably because of this:

> <https://github.com/discourse/wp-discourse/blob/main/admin/form-helper.php#L259>

It is only looking for public post types. You could try hooking into the `discourse_post_types_to_publish` filter and adding your private post type to the `$post_types` array.

> [@pgross](#):
>
> if there is a best practice for modifying the WPDiscourse plugin

The best practice is to use an available action or filter hook and make your modifications in a separate plugin. If you need a hook added to the plugin, just ask. My goal with the plugin is to make it as extensible as possible.

---

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