How to Add Digg Button to Blogger

The best way to get to the top in Digg is by adding Digg This button to Blogger which let your readers to easily submit and share your content. It displays the real-time count.

In the official page, you can find the script and codes which are meant for developers. But in this tutorial, I will tell you in more simpler form about Digg Smart Buttons for Blogger. You just need to select the appropriate size from four diffident types, configure it and you are ready to go.

1. Go to Template tab, click “Edit HTML” and check “Expand widget template”

2. Add the below JavaScript just before </body>:

<script type="text/javascript">
(function() {
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = '';
s1.parentNode.insertBefore(s, s1);

3. Find <data:post.body/> and before/after it (or in both positions) add the below code after selecting the button size:




Show for:

Preview and code

Ajax Loading
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<div style="float: none;"> <a class='DiggThisButton DiggMedium' expr:href='&quot;; + data:post.canonicalUrl + &quot;&amp;title=&quot; + data:post.title'></a> </div>

4. At last, save your template.

P.S. This post has been updated on July, 2012.

Popular posts from this blog

How to Add Extra Gadget/Widget Section to Blogger Header

How to add Google +1 Button to Blogger

Add Facebook XFBML Like Button to Blogger