Skip to content

Instantly share code, notes, and snippets.

@dospuntocero
Created June 28, 2019 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dospuntocero/d5b78762a6953ae7ee057781cafafbd2 to your computer and use it in GitHub Desktop.
Save dospuntocero/d5b78762a6953ae7ee057781cafafbd2 to your computer and use it in GitHub Desktop.
how to remove h1 from the wordpress classic editor
function remove_h1_from_editor( $settings ) {
$settings['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre;';
return $settings;
}
add_filter( 'tiny_mce_before_init', 'remove_h1_from_editor' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment