Easily link to social media websites from WordPress
All-in-one solutions for your social needs
Where would the internet be without social media? A better place? Some would argue so, but whatever your opinions are on the subject, chances are you still have a Twitter and MySpace account, don’t you? In a recent project, I’ve had to create quite a few links to various social media websites and have come up with a series of WordPress-based snippets you can use in your next project.
Note that the code samples below only include the opening anchor for easy integration and are in alphabetical order.
Del.icio.us
<a href="http://www.delicious.com/post?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>" title="Submit this article to Del.icio.us">
Digg
<a href="http://www.digg.com/submit?phase=2&url=<?php the_permalink(); ?>" title="Submit this article to Digg">
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&t=<?php echo urlencode(get_the_title($id)); ?>" title="Submit this article to Facebook">
<a href="http://www.reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>" title="Submit this article to Reddit">
Stumbleupon
<a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>" title="Submit this article to StumbleUpon">
<a href="http://www.twitter.com/home?status=<?php echo urlencode("I am reading: "); ?><?php the_permalink(); ?>" title="Tweet this article">
