SearchForecast Marketplace

Manually Add the TweetMeme Submit Button to WordPress

Posted by: dragonblogger  //  Category: blogging

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

Related posts:

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...


If you enjoyed this post, subscribe to DragonBlogger.com
via FaceBook, Twitter, RSS or Email
or
Enter your email and subscribe now!
Email:

Written by dragonblogger (1110 Articles Published)

Working in the IT Industry for over 10 years and specializing in web based technologies. Dragon Blogger has unique insights and opinions to how the internet and web technology works. An Avid movie fan, video game fan and fan of trying anything and everything new.

Follow dragonblogger on Twitter @dragonblogger

Tags: , , , , , , , , , ,

9 Responses to “Manually Add the TweetMeme Submit Button to WordPress”

  1. Heather Kephart (58 comments) Says:

    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 My ComLuv Profile

    [Reply]

  2. Extreme John (43 comments) Says:

    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 My ComLuv Profile

    [Reply]

  3. Michael Aulia (12 comments) Says:

    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! My ComLuv Profile

    [Reply]

    dragonblogger (1957 comments) Reply:

    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]

  4. Dennis Edell (91 comments) Says:

    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? My ComLuv Profile

    [Reply]

  5. Shahab khan (1 comments) Says:

    Nice share, got it working!
    read Shahab khan´s article about Twitter Location Based Trending Topics My ComLuv Profile

    [Reply]

  6. el7cosmos from eL Abee (1 comments) Says:

    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] My ComLuv Profile

    [Reply]

  7. Mitchell Allen (1 comments) Says:

    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 TokenMy ComLuv Profile

    [Reply]

    dragonblogger (1957 comments) Reply:

    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]

Leave a Reply

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Comments links could be nofollow free.