Skip to content

Instantly share code, notes, and snippets.

@Lego2012
Last active September 19, 2017 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lego2012/4624f25e7bc0f1f69ec060f5facc61cb to your computer and use it in GitHub Desktop.
Save Lego2012/4624f25e7bc0f1f69ec060f5facc61cb to your computer and use it in GitHub Desktop.
Genesis filter a Post Page Title #wordpress #genesis
<?php
// Do NOT include the opening php tag
// Goes to Dynamik Custom - Functions Credits: http://adamcap.com/code/filter-genesis-h1-post-titles-to-add-for-styling/
/**
* 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