Often when creating a WordPress theme, I will program the page.php
template file to display the post title with an <h1>
tag. Now I’m not an SEO strategist, but I do know that you are only suppose to have one <h1>
tag on a page. Because of this, it makes sense to not allow the end user of the theme to add <h1>
tags to their post content.
This little snippet will modify the TinyMCE editor, and remove the “Heading 1” option from the formatting dropdown. This should allow to rest easy, assuming the client doesn’t decide to add the tag manually…