WordPress Jetpackのマークダウンをカスタムフィールドにも適用する

作成日:

Jetpackの機能の一つにMarkdownがあります。

で、これは本文やコメントには適用できるのですが、そのままだとカスタムフィールドには適用されませんので以下のような記述をします。

[php]ID);

if ($desc) { ?>

transform( $desc, array('id'=>false,'unslash'=>false)); ?>

[/php]

favicon
Using Jetpack's markdown on custom fields https://anchor.host/2016/11/29/using-jetpacks-markdown-on-custom-fields/

Jetpack’s markdown module is easy way to add markdown to WordPress. If your not familiar with markdown then this is a good starting point. Out of the box you can use this on any WordPress page or post. Recently I was curious if I could use Jetpack’s markdown other places like custom fields. Turns out, yes and it’s not that difficult. Markdown turns textareas into powerful inputs Sometimes a full blown text editor is overkill. Using markdown with a simple textarea box is more accessible on devices like phones. On the logged in portion of anchor.host I created a custom internal logging system.…

物草 灸太郎
物草 灸太郎

WordPressでホームページを制作しつつ、休日は畑を耕したりDIYを楽しんでいます。

Loading...

コメントをどうぞ

  • メールアドレスが公開されることはありません。
  • コメント欄にURLは入力できません。
  • このサイトはreCAPTCHAによって保護されており、Googleのプライバシーポリシー利用規約が適用されます。