If you have addthis.com and you aren’t satisfied with the plain share button that’s available for WordPress, you can use this code to change it to the fully functional dropdown share menu. Just add this code to the end of your blog posts. You will most likely want to add it to the archive.php, index.php, and single.php files in your theme directory ( /path/to/wordpress/site/wp-content/themes/sometheme/single.php etc.)
I just made one php file called addthis_button.php that had this code in it:
[source:php]<?php
// change this to your addthis user name
$addthis_user=’asherbond’;
?>
<!– AddThis Button BEGIN –>
<script type=”text/javascript”>addthis_pub = ‘<?php print $addthis_user; ?>’;</script>
<a href=”http://www.addthis.com/bookmark.php?pub=<?php print $addthis_user; ?>&url=”<?php print get_permalink(); ?>”&title=”<?php print get_the_title($id); ?>”\”" onmouseover=”return addthis_open(this, ”, ‘<?php print get_permalink(); ?>’, ‘<?php print get_the_title($id); ?>’)” onmouseout=”addthis_close()” onclick=”return addthis_sendto()”><img src=”http://s9.addthis.com/button1-share.gif” width=”125″ height=”16″ border=”0″ alt=”" /></a><script type=”text/javascript” src=”http://s7.addthis.com/js/152/addthis_widget.js”></script>
<!– AddThis Button END –>
[/source]
Then I added the code to include it in each of these files: single.php, index.php, and archive.php:
[source:php] <?php include(‘addthis_button.php’); ?>[/source]

