Add SEO Friendly Social Media Links To WordPress

Wednesday, December 3rd, 2008 | Blogging, Hack, Open Source, Promotion, SEM, Tools, Twitter

Add SEO Friendly Links To WordPress Pages and Posts

Jeff from over at Perishable Press has just posted a handy guide to adding code to your WordPress theme that will enable you to offer SEO-Friendly, fully validating social media links for each of your pages or posts. If you want the easy way of adding social media links to your blog, there are countless WordPress plugins that will do just that, this method is for those of you who want to use as few plugins as possible (a real lean mean blogging machine!)

He gives the code for Delicious, Digg, Twitter, StumbleUpon, Technorati, Blinklist, Furl, Reddit and AddThis (with more sites provided in the comments).

Here’s an example for Digg.com:

<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=<?php the_permalink(); ?>" title="Submit this post to Digg">Digg this!</a>

In order to add the code to each post, edit the single.php and paste in the appropriate code before the comments PHP tag. So you’d paste it before:

< ?php comments_template(); ?>

To add the code to your pages, edit page.php and paste the appropriate code after the PHP tag for your page content. So depending on your theme you’d paste it after:

< ?php the_content(); ?>

To have the links appear on the homepage after the end of each post, edit index.php and paste the appropriate code after the content PHP tag, though it might differ depending on your theme. So you’d paste the code this time after:

< ?php the_content(__('Read more'));?>

Go check out the full post for more examples.

Tags: , , , , ,

No comments yet.

Leave a comment

Other Places You Can Find Me: