Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressで表示されないカスタムフィールドを修正する方法(簡単ガイド)

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressサイトで「カスタマイザー」オプションが見つかりませんか?

カスタムフィールド」はWordPressの高度な機能で、WordPressの投稿やページにカスタムコンテンツやメタデータを追加するのに役立ちます。

この投稿では、WordPressでカスタムフィールドが表示されない問題を素早く解決する方法を紹介します。

Fixing custom fields not showing in WordPress issue

WordPressでカスタムフィールドが表示されない問題の修正

カスタムフィールドは通常、WordPressの投稿、ページ、またはカスタム投稿タイプに関連付けられています。

WordPressのチュートリアルの中で、カスタマイザーについて書かれているのをよく見かけます。しかし、特に最近WordPressブログを立ち上げた方は、カスタムフィールドの設定をサイト上で目にすることはないでしょう。

以前は、すべてのWordPressサイトの投稿編集画面で、カスタムフィールドが初期設定で表示されていました。

しかし、WordPressのコア開発チームは、高度な機能であるため、すべての新規ユーザーに対して初期設定で非表示にすることを決定しました。

また、投稿エディターから数回クリックするだけで、誰でも簡単にカスタムフィールドを表示できるようにした。

既存の投稿日/ページを作成または編集し、画面右上の三点メニューをクリックするだけです。

Block editor preferences

メニューの一番下にある「設定」オプションをクリックします。

これでブロックエディターの’環境設定’ポップアップが表示されます。ここから、’パネル’タブに切り替え、’カスタムフィールド’オプションの隣にあるトグルを切り替える必要があります。

Show custom fields

注意: サイトにカスタマイザーオプションが表示されない場合は、この投稿の下のトラブルシューティングのセクションまでスクロールしてください。

WordPressは、カスタマイザーを有効化するにはページのリロードが必須であることを伝えます。

有効化&再読み込み」ボタンをクリックしてください。

エディター画面がリロードされ、ページの一番下までスクロールすると、「カスタムフィールド」ボックスがあります。

Custom Fileds meta box now visible

WordPressはあなたの表示選択を記憶し、WordPressサイトで投稿やページを編集するたびにカスタムフィールドボックスを表示し続けます。

カスタムフィールドボックスを使用して、カスタムフィールドとその値を追加、編集、削除できるようになりました。

カスタマイザーとは?カスタムフィールドで何ができますか?

初期設定では、WordPressは新しい投稿、ページ、または任意のコンテンツタイプを書くと、それを2つの異なるエリアに保存します。最初の部分は、ブロックエディターを使って追加したコンテンツの本文です。

第二の部分は、その特定のコンテンツに関する情報である。例えば、タイトル、投稿者名、日時など。この投稿情報はメタデータと呼ばれる。

初期設定の投稿メタデータとは別に、WordPressではカスタムフィールドを使ってカスタムメタデータを保存することもできます。

さらに詳しくお知りになりたい方は、WordPressカスタムフィールドの初心者ガイドをご覧ください。

WordPress開発者は、投稿のカスタム投稿メタデータを保存するためにカスタムフィールドを使用します。例えば、All In One SEOプラグインはカスタムフィールドを使って投稿のSEO設定を保存します。

AIOSEO custom fields

しかし、プラグイン開発者は通常、初期設定のカスタムフィールドボックスを使用する代わりに、カスタムメタボックスを作成します。これにより、ユーザーが情報を入力しやすくなります。

カスタムメタ情報を簡単に入力できるカスタムメタボックスを作成したい場合は、 WordPressでカスタムメタボックスを追加するガイドを参照してください。

WordPressのカスタムフィールドのトラブルシューティング

最近、読者の一人がブロックエディターの環境設定からカスタマイザーオプションが消えているという問題に遭遇しました。調査の結果、この問題の原因がわかりました。

WordPressサイトに「環境設定」メニューのカスタムフィールドオプションがない場合は、Advanced Custom Fields(ACF)プラグインがインストールされ有効化されているかどうかを確認する必要があります。

ACFは、カスタムメタボックスを作成するために開発者が使用する人気のWordPressプラグインです。

ACFバージョン5.5.13では、初期設定のWordPressカスタムフィールドメタボックスを削除する設定を追加しました。これにより、投稿編集ページのロード時間が短縮されます。ACFを使用しているので、初期設定のメタ情報は必要ないということです。

しかし、デフォルトのWordPressカスタムフィールドメタボックスを有効化したい場合は、functions.phpファイルまたはWPCodeを使用して、WordPressテーマに以下のコードを追加する必要があります:

add_filter('acf/settings/remove_wp_meta_box', '__return_false');

詳しくは、WordPressでカスタマイザーコードを簡単に追加する方法をご覧ください。

この投稿が、WordPress サイトのカスタムフィールドが表示されない問題の解決に役立てば幸いです。また、WordPressの最も便利なヒント、トリック、ハックの究極のリストや、 あなたのサイトを成長させるために必要なWordPressプラグインのエキスパートピックもご覧ください。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

46件のコメント返信を残す

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Ralph says

    If this is in additional section is it really worth it to put information there? Does this benefit SEO in any important way? Or is it more for us? I don’t really understand the benefit here.

    • WPBeginner Support says

      It would depend on what custom fields weren’t showing for you. Sometimes the section for a plugin would disappear and following this guide would have the section reappear for you.

      管理者

  3. Keith Stanfield says

    Custom fields are not showing under product data with this plugin, I added the function code and enable the custom fields checkbox but nothing shows up.

    • WPBeginner Support says

      If you are using the block editor, we would recommend checking under preferences to ensure the custom fields are not hidden based on those settings. :)

      管理者

  4. Dalia Sued says

    Custom fields disappear from WordPress 6.1, since the new WordPress update, all plugins that have custom fields have disappeared from all posts type, including posts and pages.

    • WPBeginner Support says

      Custom fields are still available, you may have them disabled in your editor. If you go to the top-right and click the three dots, then go to preferences you should find the option to enable custom fields.

      管理者

  5. will says

    i have ACFs that dont display on my home page. i know the ACF pro plug in needs to be updated. Would this result in why my fields aren’t displaying on my homepage?

    • WPBeginner Support says

      That could be part of the issue. If you reach out to the plugin’s support they should be able to assist.

      管理者

  6. Ushir Shah says

    Thank you! Adding the filter to the functions file because of ACF was my issue, what a great help!

  7. Cedric Shaw says

    So we have ACF running and have the “fix” in our functions.php file. The issue we are having is that the drop down field is only showing 148 entries and not displaying all of the custom fields. Is there something that is preventing them from not displaying all of the custom fields?

    • WPBeginner Support says

      For that, you would want to reach out to ACF’s support to see possible reasons for this issue.

      管理者

  8. Poul says

    I spend a couple hours to solve this problem (find out why i don’t see that option in “Screen Options” menu).

    Thanks! :)

  9. Luke says

    Hello,

    Thanks for your tip.
    I’ve installed ACF, however still don’t see custom field checkbox.
    When I tried to paste the code I got following error message: syntax error, unexpected ‘add_filter’ (T_STRING)
    Could you please advise?

    Many Thanks!

  10. SK says

    Hi. I have re-instated the custom fields. I can add new, but original fields are not showing in the back end (still displayed on website) so I cannot edit my content. Any ideas? Thanks

  11. Serge says

    Super. We were looking for the setting that was hiding the custom fields. We knew it was a setting but could find where. Thanks also for the bit of code, could come handy eventually.
    merci,
    Serge.

  12. Dave Combs says

    Sadly, the add_filter code for the functions.php file did not work, so I’m off to find to try to solve the problem.

    • WPBeginner Support says

      Thank you for letting us know, we’ll certainly keep an eye out for other solutions to recommend.

      管理者

  13. David says

    I lost a day of work trying to figure out why my custom metabox wasn’t showing. Then I checked the source code and it was there with the ‘hide’ class suffix. Thanks a lot ACF :(

    Thank you for the fix :)

  14. Robbie says

    Just wanted to say thanks for the add_filter() trick in the troubleshooting section. A new client needed me to fix something on a site I’d never seen and this was what I finally needed.

  15. Julia Moss says

    Thank you so much – this problem has been driving me mad! Your code for the functions file worked.

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。