Register an account
E-mail will only be used to recover your login information
Social

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(); ?>&amp;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&amp;url=<?php the_permalink(); ?>" title="Submit this article to Digg">

Facebook

<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&amp;t=<?php echo urlencode(get_the_title($id)); ?>" title="Submit this article to Facebook">

Reddit

<a href="http://www.reddit.com/submit?url=<?php the_permalink(); ?>&amp;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(); ?>&amp;title=<?php echo urlencode(get_the_title($id)); ?>" title="Submit this article to StumbleUpon">

Twitter

<a href="http://www.twitter.com/home?status=<?php echo urlencode("I am reading: "); ?><?php the_permalink(); ?>" title="Tweet this article">
How-to Wordpress XHTML/CSS

Something on your mind?

Leave a comment and let the world know.

X

Woah, you're not logged in! Would you like to login or register?

Your Ad Here
Get a Dropbox!