# カスタム投稿タイプの公開が空白になる問題のデバッグ

**URL:** <https://meta.discourse.org/t/debugging-issue-with-custom-post-type-publishing-as-blank/157750>\
**Category:** WordPress\
**Created:** [2020 年 7 月 14 日午後 9:06 UTC](https://meta.discourse.org/t/debugging-issue-with-custom-post-type-publishing-as-blank/157750 "2020-07-14T21:06:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<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:** [2020 年 7 月 14 日午後 9:06 UTC](https://meta.discourse.org/t/debugging-issue-with-custom-post-type-publishing-as-blank/157750/1 "2020-07-14T21:06:00Z")

</div>

[WP Discourse: advanced custom filter for discourse\_publish\_format\_html - #12 by Kayla](https://meta.discourse.org/t/wp-discourse-advanced-custom-filter-for-discourse-publish-format-html/106059/12) に、別のカスタム投稿タイプ用の IF セクションを追加しています。これは、最近のトピック [Filtering the available categories for a custom post type](https://meta.discourse.org/t/filtering-the-available-categories-for-a-custom-post-type/157298) で述べたように、特定の Discourse トピックに制限し、自動的に公開したいと同じ投稿タイプです。投稿は正しくトピックに自動公開されていますが、discourse\_publish\_format\_html に含めようとしているカスタムフィールドが空で渡されてしまいます。フィールド名を四重に確認しましたが、フィールド値自体以外はすべて Discourse に渡されているようです。

以下の要因が原因である可能性はありますか？

1. CPT は、Gravity Forms Advanced Post Creation Add-On プラグインを介して WordPress で作成されています。
2. CPT には Toolset Access が適用されており、エディターのみがこれらの特定の投稿を表示できます。WP のステータスは「公開済み」です。
3. CPT はプライベートな Discourse カテゴリに公開されています。

Discourse に渡されているのは、投稿/トピックのタイトル、{author}、{blogurl} です。もしかすると、{excerpt} もカスタムフィールドと同様に空を返していることが鍵でしょうか？

---

_[View the full topic](https://meta.discourse.org/t/debugging-issue-with-custom-post-type-publishing-as-blank/157750)._
