【WP】ビジュアルエディタの不要な見出しを削除する

下記のコードをfunction.phpに貼り付け。

//** ビジュアルエディタから見出しを削除   元→  段落=p;見出し2=h2;見出し3=h3;見出し4=h4;見出し5=h5;見出し6=h6;整形済みテキスト=pre;  **/
function custom_tiny_mce_formats( $settings ){
  $settings[ 'block_formats' ] = '段落=p;見出し2=h2;見出し3=h3;整形済みテキスト=pre;';
  return $settings;
}
add_filter( 'tiny_mce_before_init', 'custom_tiny_mce_formats' );
タイトルとURLをコピーしました