I've been trying to get this to work on my site, but I'm not exactly sure the right way to go about writing the code to accomplish it. I basically know what I need to do, but I need a little bit of help to get it right.
Basically, what I'd like to do is attach the "Digg" button to each post in WordPress... which would require me to edit the single.php (Single Post) file.
The easy way to do this would to just attach the code to each post, which is this:
<script type="text/javascript">digg_url = "<?php the_permalink(); ?>"</script>
<script src="
http://digg.com/tools/diggthis.js" type="text/javascript"></script>
That would be fine and all but now I need to position it. What I want to do is basically have it attached to the wrapper (or I should say fixed) on the left side of the wrapper, so that when the user scrolls, the button scrolls with the page as well.
Now I figured I might use a code like this:
<div style=”display:block;float:left;top:0px;position:fixed;left:40px;”> (DIGG BUTTON SCRIPT GOES HERE) </div>
But I ran into a problem, obviously the users page width will effect the positioning on that and the button won't really be attached to the wrapper.
So, my obvious question is, how do I fix this button to the wrapper of each post?