How to modify the h2 for a post/page

Community Forums Forums Design Tips and Tricks How to modify the h2 for a post/page

This topic is: not resolved

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

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



    For this page:
    the current h2 tag is: <h2><a href=”” title=”Johnny Depp as Captain Jack Sparrow”>Johnny Depp as Captain Jack Sparrow</a></h2
    I have a sub-heading for this post “sub heading is here” and I would like to change the h2 for this sub heading instead of above content.





    you’re subheading text is part of the page content. I do not recommend that being set to h1 as it can result in multiple h1 tags on archive pages. You can change that in the editor to be an h2 tag. The Genesis theme changes the markup of the post title from h2 to h1 on single post pages automatically which makes for the best heading control for archives and single pages.

    You can override this by removing the genesis_do_title action and rebuilding your own action.
    remove_action( 'genesis_post_title', 'genesis_do_post_title' );

    Check out my Genesis Explained series for more details on how this is done.



    thanks Nick, it is helpful.

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

You must be logged in to reply to this topic.