• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Change site title from h1 to h2

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: resolved

Tagged: change heading tag, site title

  • This topic has 2 replies, 2 voices, and was last updated 8 years, 7 months ago by jiversen.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 21, 2013 at 11:56 pm #74904
    jiversen
    Member

    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.

    http://lipitor.projectviewing.com/
    November 22, 2013 at 9:25 am #74982
    Sridhar Katakam
    Participant

    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;
    
    }

    Source: http://www.billerickson.net/code/genesis-customize-site-title/


    Genesis Tutorials | Follow me on Twitter

    November 25, 2013 at 3:24 pm #75574
    jiversen
    Member

    Hi Sridhar,

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

    Cheers,

    Jordan

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble