Skip to content

Instantly share code, notes, and snippets.

@kentonscode
Created September 2, 2014 20:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentonscode/b95df2e026347aa9c1c7 to your computer and use it in GitHub Desktop.
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.
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