• 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 H1 tag to H2 on post titles – Infinity theme

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 › General Discussion › Change H1 tag to H2 on post titles – Infinity theme

This topic is: not resolved

Tagged: Heading tags, post titles

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 2 months ago by Brad Dalton.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 13, 2017 at 7:18 pm #201096
    ChrisGregory
    Member

    The post title on posts is set to an h1 tag on the infinity theme.
    I would like to change this to an h2 tag, so I can implement an h1 tag in the actual post.
    I do not want more than one h1 tag on each post.
    Any idea's how to execute this?

    http://studiojphotography.ca/
    February 14, 2017 at 5:10 am #201116
    Brad Dalton
    Participant

    Something like this:

    function my_title_wrap(){
        return 'h2';
    }
    add_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );
    

    If you search for genesis_entry_title_wrap in the genesis folder, you'll find the filter.

    You can use conditional tags to control where the filter executes.


    Tutorials for StudioPress Themes.

    February 23, 2017 at 7:31 pm #201865
    ChrisGregory
    Member

    Hi Brad,

    Thank you for sharing.

    So if I understand correctly,

    In my functions.php file, I enter:

    function my_title_wrap(){
    return 'h2';
    }
    add_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );

    If (Is_Single) {
    ( 'genesis_entry_title_wrap', 'my_title_wrap' );
    }

    February 23, 2017 at 8:00 pm #201867
    Brad Dalton
    Participant

    Add the conditional tag after the function name within the function

    function my_title_wrap(){
    if ( is_singular( 'post' ) )
    return 'h2';
    }
    add_filter( 'genesis_entry_title_wrap', 'my_title_wrap' );
    

    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ 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

© 2026 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