Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Here's an example of how to filter your H1 content... you can use this to add span tags around your h1 if you want more styling control, but in this case I've added in a shortcode after the title to display sharing buttons. But you could put anything in here..
<?php
add_filter( 'genesis_post_title_output', 'twp_amend_post_title_output');
/**
* Filter Genesis H1 Post Titles
*/
function twp_amend_post_title_output( $title ) {
if ( is_singular() )
$title = sprintf( '<h1 class="entry-title">%s' . do_shortcode('[ssba]') . '</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