« Previous

Creating a Digg This Button for Your WordPress Blog

Posted on April 30, 2008
Filed Under Javascript, WordPress | Leave a Comment
No tag for this post.

Creating a Digg This button is very easy. Here's a non-plugin approach:

<script type="text/javascript">
digg_url = '<?php the_permalink() ?>';
digg_title = '<?php the_title() ?>';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

Copy and paste above script to anywhere between your WordPress' theloop:


Instead post specific Digg button, you can create a site wide button as well:

<script type="text/javascript">
digg_url = '<?php bloginfo('url'); ?>';
digg_title = '<?php bloginfo('name'); ?>';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

Useful Links

http://digg.com/tools/integrate
http://wordpress.org/download/

Go to Top

More interesting posts ...

  • No Related Post

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

Attention
If you want to post source code, please wrap it with <pre> and </pre>

Categories

Polls

  • Tell other about your screen resolution (pulled from web stats):

    View Results

    Loading ... Loading ...