Wednesday, April 30, 2008

How to add a DIGG button on every post

This simple Blogger template hack will put a DIGG button to every post.

Step 1. Under Settings Tab click on Edit HTML
Step 2.
Put a check on Expand Widget Templates










Step 3. Search for the code <p><data:post.body/></p>









Step 4.
Copy the code below and paste it above
<p><data:post.body/></p>





<div style='float:right; margin-left:10px;'>

<script type='text/javascript'>

digg_url="<data:post.url/>";

</script>

<script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>

</div>


If you want your button to be placed on the right just changed the value of margin-left and replace it with margin-right.

1 comments:

Anonymous said...

thanks for sharing this. I always wanted to put a digg button on my blog but didn't know how to do it.

thanks again. you make our blogging life more easier.