Add Digg links to your Blogger and Wordpress posts

First backup your template.

Go to Layout->Edit HTML and click download full template.

This uses small thumbs up icon from Digg. There are several icons available from Digg Buttons & Badges

<a href=”http://digg.com/submit?phase=2
&url=<?php the_permalink() ?>
&title=<?php the_title(); ?>
&bodytext=<?php the_excerpt() ?>”
title=”Digg this story”>

<img src=”http://digg.com/img/badges/10×10-digg-thumb.png”

width=”10″ height=”10″ alt=”Digg!” /> Digg this</a>

The first part provides the link submission information. The second part is for the icon. If you want to change the icon just replace the second section of code with icon code from the Digg badge page.

Wordpress:
You’ll need to add this code to your index.php page.

Open that page and find the section: < div id=”content>
Then go down a few lines and find the post footer information, you’ll see ‘Posted in’ and ‘the author’ etc. Put the code after the last of the content information.

You will also want to add this to your pages ( page.php ). Again look for the < div id=”content> section and add it just before the end of that section.

Blogger
<span class=’post-labels’ style=’float:right;’>
<a expr:href=’”http://digg.com/submit?phase=2&url=” + data:post.url + “&title=” + data:post.title’ target=’_blank’>DiggIt!</a></span>

Go to Templates->Edit HTML then check Expand Widget Templates

Find:
<p class=’post-footer-line-3′/>

You want to put your Digg link just above that line. This link does not have an icon. You can grab an icon plus directions to add it to your link at the Digg badge page above.

That worked on 6 of my 7 blogger blogs. One blog I needed to post the link just above the line:
<!– quickedit pencil –>

*** To use the link with out an icon just use:

<a href=”http://digg.com/submit?phase=2
&url=<?php the_permalink() ?>
&title=<?php the_title(); ?>
&bodytext=<?php the_excerpt() ?>”
title=”Digg this story”>
Digg this</a>

See also:
How to add Del.icio.us Links to Blogger and Wordpress Posts
How to add Stumble Upon Links to Blogger and Wordpress Posts
How to add Reddit Links to Blogger and Wordpress Posts

4 Comments

You must be logged in to post a comment.