Add Digg To Blogger.com Posts

By Brian, December 5, 2007 2:51 pm

After a poking around the xml template for my site, and playing around with the Digg code, I’ve figured out how to add a Digg button to my posts.
Listed below is a quick how-to for adding this functionality to your website too.

  1. Make sure your blog is set to enable Post Pages and you are using the new Blogger, not the classic version
  2. Go to the customization section of your blog, on the Template tab select Edit HTML
  3. Make sure to click Download Full Template and save a backup copy to disk – just in case.
  4. Put a check in Expand Widget Templates.
  5. Search for <p><data:post.body/></p>
    Update: November 5th, 2008

    It has come to my attention that some templates use a slightly different formatting. If you cannot find the text listed above – try searching for <data:post.body/> and follow the rest of the instructions.

  6. Paste this on the line directly before it:
    <div style='float:right; margin-left:10px;'>
    <script type='text/javascript'>
    digg_url=&quot;<data:post.url/>&quot;;</script>
    <script src='http://digg.com/tools/diggthis.js' type='text/javascript'/>
    </div>
  7. Preview your template to make sure it looks right – the Digg icon should appear at the top right of all your posts. Hover your cursor over it and make sure the link URL matches your post URL.
  8. If all looks well, click Save Template and then View your blog

Happy DIGGing!

91 Responses to “Add Digg To Blogger.com Posts”

  1. qarla? says:

    tnx, it helped me a lot for my website

    http://www.sassyqarla.com/

  2. kankuro says:

    hello brian i like your blog there are plenty of nice and helpful article you write.

    A Simple Kind of Something

    maybe we can have some link exchange. I already add your blog to mine. thanks a lot for a wonderfull and great article of yours.

  3. Dong says:

    Excellent!

    This was just what I was looking for to allow visitors to my blog to Digg it if they so felt the need.

    Thanks!

    I also have it running at http://dotdong.blogspot.com if anyone wants to see it working.

  4. Yank in Ulster says:

    Thank you kindly for your tips. Took me a while to tweak the placement, but I prevailed. Here is my digg code in my Blogger template. The important bits are in between the first and last lines. For me, I wanted the digg icon to be on its own line, at the footer of each Blogger posting.

    (Replace parentheses with pointed brackets)

    (div class='post-footer-line post-footer-line-3')(span class='post-location')
    (b:if cond='data:post.url')
    (script type='text/javascript')
    digg_url='(data:post.url/)';
    digg_bgcolor='#c3d9ff';
    digg_skin='compact';
    digg_window = 'new';
    (/script)
    (script src='http://digg.com/tools/diggthis.js' type='text/javascript'/)
    (/b:if)
    (b:if cond='data:top.showLocation')

  5. Pearl says:

    Hi Brian,

    I have been searching and searching, but I cannot find an answer to my question about the Digg button. Perhaps you might have one for me. I have the code set with (data:post.url) so that each post has a Digg button and can be submitted separately; however, when I click on the button, it takes me to a page where I am given an option to add a title and description and the link there is my blog url, not my post url. Any idea how to fix this?

    Thank you,
    Pearl

    Pearl Diver

  6. ArtBoon says:

    I have the same problem like Pearl…

    http://arthurboon.blogspot.com/

  7. ArtBoon says:

    managed to replace them with smaller digg button after reading the post above

  8. Anonymous says:

    Thanks…keep up the good work.

    http://e-booksheaven.blogspot.com/

  9. Pinoy IN Germany says:

    Thanks. just what I am looking for.

    looking good with my blogs ^_^

    http://pinoyingermany.blogspot.com

    http://techmata.blogspot.com

  10. Harjot Doad says:

    http://rhahfa.blogspot.com
    road to health and health for all – one of the best blogs

  11. edward ng says:

    thanks ..
    done.. http://www.technu.co.cc

  12. Josh Meyer says:

    Thanks Brian. Worked like a charm.

  13. Anonymous says:

    Thanks a lot for sharing.
    http://blogcrack.com

  14. Brunetto says:

    Excelent! Thank you!

  15. manchestersquare says:

    Brian, thank you for this article, trying to move my blog into the ‘modern’ age. Will give it try, definitely!

    http://manchestersquare.blogspot.com

  16. Romeo PHP says:

    thanks, that was great !

  17. Kathy Crabbe says:

    Thank You Brian!!!!!!!

    I have spent about an hour trying to find the code but one of the comments on your site helped me find it finally!

  18. Steve says:

    Thanks! Works a treat!

    mygadgetlife.blogspot.com

  19. ipannapi says:

    nice one!
    thanx dude..
    totally digg it!

    http://moscow-english-bookstore.blogspot.com

  20. D. Patrick Caldwell says:

    Awesome! Thanks a lot. I used your script (with a few modifications) and added several scripts of my own. If you’d like, you can find them on my blog.

  21. Oufzr57 says:

    Thanks ;)
    Working great!

  22. Gerard Banhidi says:

    Thanks for the tip!

    It is working nicely in my page.

    http://www.durkhrodchogori.com/

  23. The Team @ One Physique says:

    Thanks for the tip!

    http://www.onephysique.com

  24. silentcon says:

    Easy instruction!

  25. Do I Have Swine Flu? says:

    Thanks so much for posting this! Much appreciated. Now to get more people to Digg my posts! :)

  26. NatE says:

    I spent about a half hour looking through html code and still didn’t find what i was looking for but then went to the trusty google search engine and found this. Nice work and thanks

  27. Learn by Laughing says:

    I use the same method – not sure if I got it from you originally or not but I’ve given this blog a mention at:

    http://onlinemoneytester.blogspot.com/

  28. one Teacher says:

    thnks a lot addes in my blog get-insurance4health.blogspot.com

  29. Anonymous says:

    thanx, check out foodiesdelhi.blogspot.com, for great food in delhi.

  30. Amit says:

    thanx, check out http://foodiesdelhi.blogspot.com, for great food in delhi.

  31. naveen.sprihaa says:

    its awesome…..thanq

    htttp://www.sprihaa.blogspot.com

  32. The Hollywood Rounder says:

    Thanks for the tip.

  33. pradeep fernando says:

    thanx a lot!!! really helped me….
    http://pradeepfernando.blogspot.com/

  34. sinaisix says:

    thnx a lot. really helpful for me
    http://short.ie/foss

  35. FubarVault says:

    nice one for the code. I tweeked it a little bit, mine is now at the bottom left under the lables.
    http://fubarvault.blogspot.com/

  36. Jen says:

    hi Brian, how do i remove it?

    the big yellow dig button still appear after i removed the code..

  37. Jen says:

    Hi Brian,
    I’m sorry , the problem is solve but i can’t deleted the previous comment so i leave another one here.

  38. Robin Mitra says:

    Thanks for the article..I wonder why don’t you have a digg yourself on your article?

  39. Brian says:

    I used to have it, but I have since switched over to WordPress – it was working, but I am currently experiencing a strange issue with my plugins.

  40. JP Allen says:

    Quick question. I followed the directions as you gave them, and every post’s digg button only gives a digg to my main page. What do I need to do to fix that?

  41. Brian says:

    JP Allen – Did you modify the code at all? The tag builds the link to point to the individual page. If you changed this at all, it might not work.

Leave a Reply

Panorama Theme by Themocracy