Disable h1 and h2 from rich text editor combobox

you can change lots of things about the tinyMCE editor at the tiny_mce_before_init filter.

http://codex.wordpress.org/TinyMCE_Custom_Buttons

the following will restrict your blockformats to p,h3,h4 and blockquote

function wpa_45815($arr){
    $arr['theme_advanced_blockformats'] = 'p,h3,h4,blockquote';
    return $arr;
  }
add_filter('tiny_mce_before_init', 'wpa_45815');

EDIT for WordPress 3.9 see link

function wpa_45815($arr){
    $arr['block_formats'] = 'Paragraph=p;Heading 3=h3;Heading 4=h4';
    return $arr;
  }
add_filter('tiny_mce_before_init', 'wpa_45815');

Leave a Comment