• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
Callia Web

Callia Web

Websites - Design with Purpose

  • Home
  • Websites
  • Support
  • Our Work
  • About
  • Contact

Modify TinyMCE editor to remove the H1 style

7 Aug 2014

At the end of every project I do a one-to-one client training session where apart from showing my client how to use their new website, I also point out a few gotcha’s people often fall into.

One of them is:

You see that Heading 1 style in the visual editor format drop-down box? Well don’t use it!

And I go on to explain that ideally, you should only have one Heading 1 on a page and your Genesis theme makes the title of your page a heading 1. You can use as many heading 2, heading 3, etc as makes sense on your page.

After giving one such tutorial yesterday, I set about figuring out how to remove that Heading 1 from the visual editor format drop-down box. And it turns out to be fairly straightforward.

The code below goes in your functions file, or you can make it into a plugin if you prefer.

As always do ensure you have a backup of your functions file before you make any changes.

It is not strictly true that this removes Heading 1. What it does is add all the styles except the heading 1. And for good measure, I move the mostly unused Address and Pre formats to the end of the list.

This little snippet will be going in all my future themes, and I can cut out that 5-minute section of my tutorial. Result.

You can also view this code on github.

add_filter('tiny_mce_before_init', 'tiny_mce_remove_unused_formats' );
/*
 * Modify TinyMCE editor to remove H1.
 */
function tiny_mce_remove_unused_formats($init) {
	// Add block format elements you want to show in dropdown
	$init['block_formats'] = 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Address=address;Pre=pre';
	return $init;
}

Share this post:

Share on FacebookShare on LinkedInShare on E-mailShare on WhatsApp

About Jo Waltham

Jo Waltham is the founder of Callia Web and is passionate about helping people with their websites.

Liked this post? Subscribe to get our next post direct to your inbox.


Previous Post:developer writing codeWhat is new in Genesis Framework 2.1.1
Next Post:Fix the images in your RSS emails

Reader Interactions

Comments

  1. Slimypants

    8 Feb 2017 at 9:37 pm

    Genius, I’ve been looking for this for so long!

    Reply
  2. DrLightman

    4 Apr 2017 at 4:14 pm

    Thanks!

    Reply
  3. Andre

    4 Apr 2021 at 8:48 pm

    Cool, pretty nice trick! Thanks for sharing it Jo! 🙂

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Ready to get started?

Get in touch

Ask Callia Web’s AI

Contact us

Telephone: 01672 666001

Email: hello@calliaweb.co.uk

Quick links

Websites

Our work

Testimonials

About

Blog

Popular posts

Using headings in WordPress

Accessibility basics

Image sizes and aspect ratios

Making images equal size

Beginner’s guide to Analytics

Legal

Privacy policy / Cookie policy

Terms of service

Company number: 08316519

Registered address: Bowman House, Royal Wootton Bassett, Wiltshire, SN4 7DB

Copyright © 2025 · Callia Web Ltd · All Rights Reserved