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.
- Make sure your blog is set to enable Post Pages and you are using the new Blogger, not the classic version
- Go to the customization section of your blog, on the Template tab select Edit HTML
- Make sure to click Download Full Template and save a backup copy to disk – just in case.
- Put a check in Expand Widget Templates.
- Search for
<p><data:post.body/></p>
Update: November 5th, 2008It 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. - Paste this on the line directly before it:
<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> - 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.
- If all looks well, click Save Template and then View your blog
Happy DIGGing!
Glad to be of service, and hey, feel free to DIGG this post or link to me if you liked it. 😉
hi brian, thanks for your comment-back. actually i put a link already, on your name [brian cantin] and words [his step].
but it’s now updated by adding a footer linking to your page.
sorry for the inconvenience.
regards,
Thanks alot for the info. I managed to add Digg to my blog. It’s at slackogamer.blogspot.com
Worked perfect. Thanks!!!
great it’s working fine awesome buddy
Out of all the sites I went looked at to get the Digg button on my site, yours is the only that has worked for me.
And I was dumb enough to add it to each post…
Stupid stupid stupid…
Thanks!
“And I was dumb enough to add it to each post…”
I was going to do this and figured there had to be a better way… Going through all my posts and manually linking them seemed rather daunting.
Not to mention I am rather forgetful and lazy – so remembering to add it to each post seemed troublesome.
Thank you very much for this advice, Your method is so simple yet effective. Double thank you!
Great and useful advice, this was rea good for me.
I’m not sure what you mean ‘not genuine anymore’ – this still works just fine, as seen on all my pages.
I see that the listed link does not directly work, however, regardless of when that was posted – it was not readily available at the time I wrote mine, otherwise there would have been no point in the first place.
Many thanks! I wanted to put my digg at the bottom of each post, so I pasted the code a few lines down, after the last line in the post-footer code (it’s the data post timestamp on mine) and before the /b:if line. Thanks again.
I placed your post in my blog. I’, not sure if this happened to any one of you. when i submit a post to digg using that icon, it always gives out an error. Anyone experienced this?
WooHoo! Working like a dream 🙂
Lester
lesterhein.blogspot.com
Your post is the post that keeps on giving! Thanks! I don’t understand why it was so hard to find such simple directions. I can only imagine what your visitor count is up to.
very useful script, thanks for that
i used it in my blog
THIS WAS GREAT!Thank you so much for providing this information. With a little bit of patience, I found the prompt.
For some reason this WAS working, but today it completely stopped working. I even tried to change to a default template again, and redo it. I see when it loads up it is contacting digg.com but I can’t see anything – anybody know why? please let me know
Awesome Thanks Brian!!!
perfect tips. i added in my blog now 🙂 thanks a lots.
all this does for me is removes all my posts and leaves a bunch of digg buttons :/
nickandlena.com
Thx alot! This was exactly what I needed. And you can even customize the digg button!
thanxs a ton Brian. It worked for my blog. Appreciate your hard work.
Just a note to those who where having unexpected results – make sure you are in fact running on the new blogger and are not using blogger hosted on an external site. Be very careful to insert the code exactly where stated, otherwise things may explode. I missed a line of code trying it out and my toaster caught fire – you really need to watch closely.
I can’t find the html tag u mentioned
in the edit html template.
managed to replace them with smaller digg button after reading the post above
Thanks Brian. Worked like a charm.
Excelent! Thank you!
thanks, that was great !
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!
Thanks 😉
Working great!
Easy instruction!
Thanks so much for posting this! Much appreciated. Now to get more people to Digg my posts! 🙂
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
Thanks for the tip.
hi Brian, how do i remove it?
the big yellow dig button still appear after i removed the code..
Hi Brian,
I’m sorry , the problem is solve but i can’t deleted the previous comment so i leave another one here.
Thanks for the article..I wonder why don’t you have a digg yourself on your article?
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.
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?
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.
Thank you so much for this post! I followed your instructions exactly, & it worked straight away!
Worked perfectly for me! Thanks for sharing the great info. You must have a ton of good karma headed your way for that one!
Brilliant thanks.