Skip to content

Instantly share code, notes, and snippets.

@studiopress
Last active December 18, 2015 07:59
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save studiopress/5750621 to your computer and use it in GitHub Desktop.
Jetpack sharing buttons.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Add Jetpack share buttons above post
remove_filter( 'the_content', 'sharing_display', 19 );
remove_filter( 'the_excerpt', 'sharing_display', 19 );
add_filter( 'the_content', 'sp_share_buttons_above_post', 19 );
add_filter( 'the_excerpt', 'sp_share_buttons_above_post', 19 );
function sp_share_buttons_above_post( $content = '' ) {
if ( function_exists( 'sharing_display' ) ) {
return sharing_display() . $content;
}
else {
return $content;
}
}
/*
Jetpack Sharing
---------------------------------------------------------------------------------------------------- */
.content div.sharedaddy div.sd-block {
border: none;
padding: 0;
}
.content div.sharedaddy .sd-content {
float: left;
margin-bottom: 32px;
}
.content div.sharedaddy a.sd-button {
border: none !important;
box-shadow: none;
}
.content .sd-social-icon-text a.sd-button > span, a.sd-button > span {
opacity: 1;
padding: 6px 12px;
}
.content a.sd-button > span {
background-image: none !important;
background: #111;
border: none;
color: #fff;
font-size: 12px;
font-weight: 400;
letter-spacing: 1px;
text-transform: uppercase;
}
.content a.sd-button:hover > span {
background: #1dbec0;
}
.sd-content .sd-button span.share-count {
color: #cdf593 !important;
font-size: 100% !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment