Easiest way to put a live digg button on a WordPress blog
Posted by Voodoochilli | Posted in Design, Development | Posted on 25-05-2007
Tags: WordPress
0
I have been looking around the net for an easy way to add a live dig button to a WordPress blog. There seems to be quite a few solutions, most of them involving WordPress Plugins, which I think is a bit over kill.
You see Digg has some code that will do this for you, all you need to do is modify a bit of the code so that the dig button knows the url of the blog.
Here is all you need:
<script type="text/javascript">
digg_url = '<?php the_permalink() ?>';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
The <?php the_permalink() ?> part is the only modification needed. Simply put this in your loop on the blog page and your done! You can see a live example below.

