Last active
August 26, 2019 09:48
-
-
Save braddalton/5306694 to your computer and use it in GitHub Desktop.
Filter Genesis Entry Title Wrap Heading Tags https://wp.me/p1lTu0-grX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Filter Genesis H1 Post Titles to add <span> for styling | |
* | |
*/ | |
add_filter( 'genesis_post_title_output', 'filter_genesis_post_title_tags', 15 ); | |
function filter_genesis_post_title_tags( $title ) { | |
if ( is_singular() ) | |
$title = sprintf( '<h1 class="entry-title"><span>%s</span></h1>', apply_filters( 'genesis_post_title_text', get_the_title() ) ); | |
return $title; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment