[WordPress] 新規投稿(post-new.php) の記事本文にデフォルト値を設定する方法
WordPress の新規投稿(post-new.php) の記事本文にデフォルト値をセットするスニペットをご紹介します。
// 新規投稿ページの記事本文にデフォルト値をセットする add_filter('default_content', 'default_content_filter'); function default_content_filter($post_content){ $post_content = "[cft format=0]"; return $post_content; } |
wp-content/themes/現在使用中のテーマ/functions.php に追記します。
以上です。