Last active
April 4, 2016 19:46
-
-
Save ohdesigner/e0dddbdce8d7ca83f04367ba1851b3ea to your computer and use it in GitHub Desktop.
Simple Social Share Custom Function and CSS http://www.ohdesigner.com/wordpress-genesis-simple-social-share/
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
/** Social */ | |
function social_after_content() { | |
if ( 'post' == get_post_type() && is_single() ) { | |
echo'<div class="ss"><a class="btn btn-facebook" rel="nofollow" target="_blank" href="http://www.facebook.com/sharer.php?u='; | |
echo the_permalink(); | |
echo'&t='; | |
echo the_title(); | |
echo'">Facebook</a> '; | |
echo'<a target="_blank" class="btn btn-google" href="https://plus.google.com/share?url='; | |
echo the_permalink(); | |
echo'&">Google+</a>'; | |
echo'<a target="_blank" class="btn btn-tweet" href="https://twitter.com/intent/tweet?text=Checkout '; | |
echo the_title(); | |
echo'&url='; | |
echo the_permalink(); | |
echo'">Twitter</a> '; | |
echo'<a class="btn btn-pinterest" rel="nofollow" href="http://pinterest.com/pin/create/button/?url='; | |
echo the_permalink(); | |
echo'&media=http://www.ohdesigner.com/web-design.gif&description='; | |
echo the_title(); | |
echo'" target="blank" count-layout="none">Pinterest</a>'; | |
echo'<a class="btn btn-reddit" rel="nofollow" target="_blank" href="http://www.reddit.com/submit?url='; | |
echo the_permalink(); | |
echo'&title='; | |
echo the_title(); | |
echo'">Reddit</a> '; | |
echo'<a class="btn btn-digg" rel="nofollow" target="_blank" href="http://www.digg.com/submit?phase=2&url='; | |
echo the_permalink(); | |
echo'&title='; | |
echo the_title(); | |
echo'">Digg</a> '; | |
echo'<a class="btn btn-stumble" rel="nofollow" target="_blank" href="http://www.stumbleupon.com/submit?url='; | |
echo the_permalink(); | |
echo'&title='; | |
echo the_title(); | |
echo'">Stumble</a> '; | |
echo'<a class="btn btn-del" rel="nofollow" target="_blank" href="http://del.icio.us/post?url='; | |
echo the_permalink(); | |
echo'&title='; | |
echo the_title(); | |
echo'">Delicious</a> '; | |
echo'<a class="btn btn-digg" rel="nofollow" target="_blank" href="http://www.tumblr.com/share?v=3&u='; | |
echo the_permalink(); | |
echo'&t='; | |
echo the_title(); | |
echo'">Tumblr</a> '; | |
echo'<a target="_blank" class="btn btn-tweet" href="http://bufferapp.com/add?text='; | |
echo the_title(); | |
echo'&url='; | |
echo the_permalink(); | |
echo'">Buffer</a> '; | |
echo'<a class="btn btn-email" href="mailto:Type E-Mail Address Here?subject=I wanted to share this article with you from Ohio Designer! &body='; | |
echo the_title(); | |
echo'  '; | |
echo the_permalink(); | |
echo'" title="Email to a friend/colleague" target="_blank">Email</a>'; | |
echo'</div>'; | |
} | |
} | |
add_action( 'genesis_entry_footer', 'social_after_content', 1 ); |
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
.btn-tweet { | |
background-color: #41b7d8; | |
border-color: #41b7d8;; | |
} | |
.btn-tweet:hover, | |
a .btn-tweet:hover { | |
background-color: #238caa; | |
border-color: #238caa; | |
} | |
.btn-facebook { | |
background-color: #3b5997; | |
border-color: #3b5997; | |
} | |
.btn-facebook:hover, | |
a .btn-facebook:hover { | |
background-color: #263960; | |
border-color: #263960; | |
} | |
.btn-google { | |
background-color: #009E00; | |
border-color: #009E00; | |
} | |
.btn-google:hover, | |
a .btn-google:hover { | |
background-color: #a02f21; | |
border-color: #a02f21; | |
} | |
.btn-pinterest { | |
background-color: #cb2027; | |
border-color: #cb2027; | |
} | |
.btn-pinterest:hover, | |
a .btn-pinterest:hover { | |
background-color: #89161a; | |
border-color: #89161a; | |
} | |
.btn-email { | |
background-color: #5e82a8; | |
border-color: #5e82a8; | |
} | |
.btn-email:hover, | |
a .btn-email:hover { | |
background-color: #19212b; | |
border-color: #19212b; | |
} | |
.btn-tumblr { | |
background-color: #35465c; | |
border-color: #35465c; | |
} | |
.btn-tumblr:hover, a .btn-tumblr:hover { | |
background-color: #19212b; | |
border-color: #19212b; | |
} | |
.btn-del { | |
background-color: #3399ff; | |
border-color: #3399ff; | |
} | |
.btn-del:hover, a .btn-del:hover { | |
background-color: #19212b; | |
border-color: #19212b; | |
} | |
.btn-reddit { | |
background-color: #f99015; | |
border-color: #f99015; | |
} | |
.btn-reddit:hover, a .btn-reddit:hover { | |
background-color: #19212b; | |
border-color: #19212b; | |
} | |
.btn-digg { | |
background-color: #005580; | |
border-color: #005580; | |
} | |
.btn-digg:hover, a .btn-digg:hover { | |
background-color: #f99015; | |
border-color: #f99015; | |
} | |
.btn-stumble { | |
background-color: #eb4923; | |
border-color: #eb4923; | |
} | |
.btn-stumble:hover, a .btn-stumble:hover { | |
background-color: #19212b; | |
border-color: #19212b; | |
} | |
.btn { | |
display: inline-block; | |
font-size: 0.85em; | |
padding: 0.5em 0.6875em; | |
line-height: 1.2; | |
font-weight: normal; | |
border-radius: 0.0725em; | |
margin-right: 0.3125em; | |
margin-bottom: 0.3125em; | |
color: white; | |
border-radius: 3px; | |
} | |
.btn a{ | |
color: #FFFFFF; | |
} | |
.btn, | |
.btn:hover, | |
a .btn:hover, | |
.btn.active { | |
color: #FFFFFF; | |
text-decoration: none; | |
border-radius: 3px; | |
} | |
.btn:hover, | |
a .btn:hover, | |
.btn.active { | |
background-color: #005580; | |
border-color: #005580; | |
text-decoration: underline; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment