Web Designer, Devloper & Consultant

Social Sharing Links – WordPress

September 16th, 2011

If you’re using WordPress and want to insert some sharing links for some of the most popular social site across the web you could go the easy route and instal a plugin. But if you want the links diretly in your template I’ve compiled the links for a few of the most used sites:

Facebook

<a href="http://www.facebook.com/sharer.php?
u=<?php echo urlencode(get_permalink())?>
&t=<?php echo urlencode(get_the_title()) ?>"
target="_blank">Share on Facebook</a>

Twitter

<a href="http://twitter.com/home?
status=Currentlyreading <?php echo urlencode(get_permalink()) ?>
" title="Click to share this post on Twitter" target="_blank"
>Share on Delicious</a>

LinkedIn

<a href="http://www.linkedin.com/shareArticle?
mini=true&url=<?php echo urlencode(get_permalink()) ?>
&title=<?php echo urlencode(get_the_title()) ?>
&source=<?php get_home_url(); ?>" target="_blank">
Share on LinkedIn</a>

Digg

<a href="http://digg.com/submit?
phase=2&url=<?php echo urlencode(get_permalink()) ?>
&title=<?php echo urlencode(get_the_title()) ?>
" target="_blank">Share on Digg</a>

Reddit

<a href="http://reddit.com/submit?
url=<?php echo urlencode(get_permalink()) ?>
&title=<?php echo urlencode(get_the_title()) ?>"
target="_blank">Share on Reddit</a>

Tumblr

<a href="http://www.tumblr.com/share/link?
url=<?php echo urlencode(get_permalink()) ?>
&name=<?php echo urlencode(get_the_title()) ?>"
target="_blank">Share on Tumblr</a>

StumbleUpon

<a href="http://www.stumbleupon.com/submit?
url=<?php echo urlencode(get_permalink()) ?>"
target="_blank">Share on StumbleUpon</a>

Delicious

<a href="http://www.delicious.com/save?
url=<?php echo urlencode(get_permalink()) ?>"
target="_blank">Share on Delicious</a>


Leave a Reply