Manually Add the TweetMeme Submit Button to WordPress
Posted by: dragonblogger // Category: bloggingI 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
Related posts:
- WordPress Plugins: TweetMeme 1.7.1 Released TweetMeme 1.7.1 fixes many issues that bloggers were having with Wordpress 2.8.4 where the plug-in was causing errors in the...
- Reasons Why Twittley is Better than Tweetmeme for WordPress My fellow technology blogger Tycoon Blogger did an excellent article explaining why Twittley is better than Tweetmeme as a twitter...
- Twitter Offers Own Retweet Button Twitter officially releases a Retweet button and includes using its own t.co URL shrinking but are there ways to collect...
- Retweet Your WordPress Posts With Tweetmeme Make it easy to retweet your blog posts with Tweetmeme a most excellent plugin for wordpress which simply displays a...
- Adding Google Analytics to your WordPress Blog I have compiled a list of tips and helpful hints for anyone who needs to add Google Analytics code for...
| via FaceBook, Twitter, RSS or Email | ![]() |
Enter your email and subscribe now!
Tags: Add TweetMeme button to wordpress, adding tweetmeme, blogging tips, change tweetmeme location, customize tweetmeme button, how to add tweetmeme, manually add tweetmeme button to wordpress, tweetmeme button, tweetmeme for wordpress, wordpress tips, wordpress tweetmeme tips









November 11th, 2009 at 7:40 am
Cool, Justin! Thanks for sharing the information. I use Thesis now and it apparently doesn’t have a single.php, which has become the bane of my existence. I would like to do a nice table like that someday, too. Eventually!
Heather Kephart´s last blog ..Comment on Guest Post: Cindy the Facebook Bat Lady by Dawn
[Reply]
November 11th, 2009 at 8:53 am
Great tutorial I never even thought to write a post explaining how to do this for people, I insert mine manually as well. Offers much more control.
Extreme John´s last blog ..5 Reasons I Suck at Entrecard
[Reply]
November 12th, 2009 at 5:38 pm
I just wish there is a plug-in that displays all the widgets. I know there are heaps of them already, but none displays them with the counts, etc
Michael Aulia´s last blog ..Win LG Phones!
[Reply]
November 12th, 2009 at 7:19 pm
I know, I dislike having to do all of these manually, I wish a nice little box, I like the little social feed box on huffingtonpost.com wish I could design something similar.
[Reply]
November 13th, 2009 at 12:09 pm
Sweet! As I just mentioned on John’s meme button post, this is a keeper. I haven’t used the plugin yet and now I can install it manually! Maybe…lol
Dennis Edell´s last blog ..He/She Has Unsubscribed – Should You Ask Why?
[Reply]
January 24th, 2010 at 9:20 am
Nice share, got it working!
read Shahab khan´s article about Twitter Location Based Trending Topics
[Reply]
April 4th, 2010 at 7:55 pm
Well…thats great!!
i manually add the HTML to the template, without wrapping it in function
el7cosmos@eL Abee´s last blog ..Fakta Tentang Air Mani [Infografis]
[Reply]
August 13th, 2010 at 12:14 am
Justin, this was great. I recently installed both TweetMeme and SexyBookmarks plugins for WordPress. My sexy bookmarks only showed up after I deactivated all other plugins. After a bit of testing, I traced the conflict to TweetMeme. I needed to find out how to fix it. Guess what? You were number one on Google for this BROAD search:
tweetmeme sexybookmarks conflict
That took me to another post on your blog. The related posts brought me here to this gem.
Now, I’m going to have to seriously consider more manual insertions
Thanks!
Mitch
Mitchell Allen´s last blog ..Could Not Find CAPTCHA Token
[Reply]
August 13th, 2010 at 7:29 am
Since it is so easy to get code snippet from websites, and equally as easy to just insert them into your single.php or index.php right before or after content. I always prefer to do things manually than use a plugin if possible. Glad you found this site via Google search.
[Reply]