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 type=”text/javascript” src=””></script>

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

Share Feedback We Want to Hear From You
AI Chatbot Avatar