Standing on the Shoulder of Linus

Home / 2012 / 11月 / 14 / Custom Field Snippet Plugin

Custom Field Snippet Plugin

Custom Field Snippet Plugin creates a snippet for displaying Custom Field data.

WordPress has get_post_meta function which displays custom field data. If you have many custom fields, you need many get_post_meta. It might be a hard work.

This plugin creates a snippet, like <?php echo get_post_meta($post->ID,'FIELD NAME HERE',true); ?>. All you have to do is, copy the codes and paste them to your theme.

Additionally, when you are using Advanced Custom Fields plugin, you can get the codes for ACF. When you use conditional logic in your custom fields, you will get the snippets with conditional logic settings.

関連

Posted in myplugin | Tagged スニペット, デザイン
← 関西オープンフォーラム2012 & DocFest2012 WordPress カスタムフィールドスニペット →

アーカイブ

人気の投稿とページ

  • キンドル本を印刷する(PDFに変換する)方法
  • 名古屋駅から国際センターまでの道のり(徒歩)
  • AGPL ライセンス(GPLとは似ているが違いもある)
  • 6年使ったイーモバイル(Y!mobile)を解約手続。店頭でSIM返却
  • JP-Secure SiteGuard WP Pluginは不正ログイン防止に役立つか

プロフィール

水野史土:月70万PVホームページ制作会社のレスキューワーク株式会社で、PHPソフトウェアのサポートを行っている。concrete5コミュニティリーダー、Novius OSコアコード貢献者でもある。 詳しくは管理者詳細参照。
大好評WordPress書籍「WordPressユーザーのためのPHP入門 はじめから、ていねいに。」サポートページ

Copyright © 2015 Standing on the Shoulder of Linus.