Change site title from h1 to h2

Community Forums Forums Design Tips and Tricks Change site title from h1 to h2

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  jiversen 2 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #74904


    Hello all,
    I want to know how to change the Site Title from an H1 to an H2 tag. I am using the EPIK theme.

    I know I can apply the following code to manually add the site title:

    /** Remove default site title and add custom site title **/
    remove_action( 'genesis_site_title', 'genesis_seo_site_title' );
    function custom_site_title() { 
    echo '<a href="url"><h2 class="site-title" itemprop="headline">Site Title</h2></a>';
    add_action( 'genesis_site_title', 'custom_site_title' );

    This is not ideal, if there is a better way to accomplish this where it dynamically pulls the title and url from the general settings. I tried to find a solution to this, and saw some references to the Genesis => SEO section, but did not see a way to specify the heading tag for the site title.

    My guess is that this is being generated in the /genesis/lib/structure folder, but I don’t want to modify the genesis core, as it may get overwritten if I update.

    Please advise. Thanks.

    Sridhar Katakam

    Add this in functions.php:

    add_filter( 'genesis_seo_title', 'sk_filter_genesis_seo_site_title', 10, 3 ) ;
    function sk_filter_genesis_seo_site_title( $title, $inside, $wrap ) {
    	$custom = str_replace("h1", "h2", $title);
    	return $custom;




    Hi Sridhar,

    Thanks a lot for that, it appears to fix the issue there!



Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.