Simple Blogger Tutorials

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 = 'http://widgets.digg.com/buttons.js';
s1.parentNode.insertBefore(s, s1);
})();
</script>

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

Options

Type:


Float:

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;http://digg.com/submit?url=&quot; + data:post.canonicalUrl + &quot;&amp;title=&quot; + data:post.title'></a> </div>
</b:if>

4. At last, save your template.

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

Like