Created
March 1, 2015 12:07
-
-
Save SiGaCode/63e89d645289fd5faaa8 to your computer and use it in GitHub Desktop.
Filter a genesis post/page title to add a span for styling (in single view). Goes to Dynamik Custom - Functions
Credits: http://adamcap.com/code/filter-genesis-h1-post-titles-to-add-for-styling/
This file contains 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', 'ac_post_title_output', 15 ); | |
function ac_post_title_output( $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