Manually Add the TweetMeme Submit Button to WordPress

I enjoy using TweetMeme on my blogs, it is highly recognizable but the plug-in itself allows little control over placement on where you want the submit button. You can choose top, bottom, left and right, or update the location on specific posts, but I wanted to be able to set it inside a table and make it sit next to my other social submit buttons.

I found this information over on the TweetMeme forums and thought it would be nice to share it with my blog readers.allows me to deactivate the TweetMeme plugin and use this simple code instead to place the TweetMeme plug-in exactly where I want on my wordpress posts.

Disclaimer: Make sure you take a backup of your cs_functions.php and single.php before making any changes.  You will also want to make sure you have ftp or file access to your site, in case your wordpress crashes, you may need to have ftp or file access (ssh or telnet) to restore the backup file.

First, open your functions.php file and paste this code directly above the closing ?> tag at the end of the file:

function tweetmeme(){
?>
<div style=”float: right; margin: 5px 0 15px 15px;”>
<script type=”text/javascript”>
tweetmeme_url = ‘<?php the_permalink(); ?>’;
</script>
<script type=”text/javascript” src=”http://tweetmeme.com/i/scripts/button.js”></script>
</div>
<?php
}

Next, paste this simple tag into your single.php or page.php template file, at the place you wish the button to appear:

<?php tweetmeme(); ?>

This information was posted by Shawn Hesketh from WordPress 101, who left this comment on the Tweetmeme forums.

-Dragon Blogger

Justin Germino
I have been obsessed with computers, tech, gadgets and games since the early 1980's having grown up on the Commodore 64 and Amiga computers. By day I work in the IT Security Industry and have been in IT for over 20 years. On my spare time I am a Vlogger, Blogger, Streamer, Gadget Reviewer, affiliate marketer, influencer and entertainer. I am also an avid movie fan, TV Show fan, Anime fan, video game fan and fan of trying anything and everything new.
Justin Germino

@dragonblogger

Content Creator/Owner of https://t.co/iWP6afuOc9 for Tech, Game, Entertainment and streamer at https://t.co/594fXMdMIA
I have never been as comfortable in my whole life as Kiwi looks right now https://t.co/5E6XB0JNU8 - 6 hours ago
Justin Germino
Justin Germino
Share Feedback We Want to Hear From You