Created
January 10, 2014 06:09
-
-
Save thewebprincess/8347670 to your computer and use it in GitHub Desktop.
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..
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
<?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