Social Media Sharing links without using a Plugin
Published: 23, Oct 2014
Uncategorized
If you ever want to include Social Media sharing links, like the ones found here on my blog, without wasting resources using some bloated plugin, you can use this code.
<div class="facebook"> <a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>&p[images][0]=<?php //echo $challenge_card[sizes][large]; ?>" target="blank"> <span class="entypo_social"></span> </a> </div> <div class="twitter"> <a href="http://twitter.com/share?text=<?php the_title(); ?>&url=<?php the_permalink(); ?>&via=twitter" title="Share on Twitter" rel="nofollow" target="_blank"> <span class="entypo_social"></span> </a> </div> <div class="linkedin"> <a href="http://www.linkedin.com/shareArticle?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>"> <span class="entypo_social"></span> </a> </div> <div class="pinterest"> <a target="_blank" href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=&description=<?php the_title(); ?>" > <span class="entypo_social"></span> </a> </div>
Note: This particular block would require you’re using the entypo font library somewhere in your theme. You can always replace the social media buttons themselves with your own images or generate your own font set from fontello.com