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


Markdown quick reference

See the Markdown page for instructions on enabling Markdown for posts, pages and comments on your blog, and for more detailed information about using Markdown. Markdown Processed Emphasis *Emphasize* _emphasize_ **Strong** __Strong__ Emphasize Strong Some WordPress.com themes may have different formatting for these styles Inline Links A [link](http://example.com “Title”).


jetpack_require_lib( 'markdown' );
$desc = get_field('description', $process_log->ID);

if ($desc) { ?>
<div class="desc">
  <?php echo WPCom_Markdown::get_instance()->transform( $desc, array('id'=>false,'unslash'=>false)); ?>
<?php } ?>

Using Jetpack’s markdown on custom fields – Anchor Hosting

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.