Created
September 2, 2014 20:40
-
-
Save kentonscode/b95df2e026347aa9c1c7 to your computer and use it in GitHub Desktop.
What I use to show jetpack sharing options above and below posts on Genesis themes.
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
remove_filter( 'the_content', 'sharing_display', 19 ); | |
remove_filter( 'the_excerpt', 'sharing_display', 19 ); | |
add_filter( 'the_content', 'share_buttons_above_post', 19 ); | |
add_filter( 'the_excerpt', 'share_buttons_above_post', 19 ); | |
function share_buttons_above_post( $content = '' ) { | |
if ( function_exists( 'sharing_display' ) ) { | |
return sharing_display() . $content; | |
} | |
else { | |
return $content; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment