Change the post title tag to h2

In the Customizr WordPress theme, you can easily change the default h1 html tag of the post or page title with the ‘tc_content_title_tag’ filter.

The quick example below illustrates how to change every post of page title to h2 (instead of the default h1)

add_filter('tc_content_title_tag' , 'my_title_tag');
function my_title_tag() {
    return 'h2';

You can be more specific and use the WordPress conditional tags


Where to paste this code? => in your functions.php file. I strongly recommend to create a child theme. Download a start-up child theme here.

Everything you need to know about child theme with Customizr here.

8 thoughts on “Change the post title tag to h2”

Comments are closed.