いつも便利に使わせて頂いているプラグイン、AddQuicktag
カスタム投稿で記事を書くときもこれを使いたいなぁと思っていたのですが、あっさり解決しました。
このプラグインほんとに便利ですよね!!
AddQuicktagを表示する方法
プラグインのページのOtherNoteにその方法が記載されておりました。
手順はとっても簡単です。
functions.phpに以下を記載します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
// add custom function to filter hook 'addquicktag_post_types' add_filter( 'addquicktag_post_types', 'my_addquicktag_post_types' ); /** * Return array $post_types with custom post types * * @param $post_type Array * @return $post_type Array */ function my_addquicktag_post_types( $post_types ) { $post_types[] = 'edit-comments'; return $post_types; } |
Pingback: AddQuicktagで追加したコードを、カスタム投稿タイプにも反映させる | 個人的wordpressメモ()