Hello Friends,These days you can see TweetMeme button on every website by which anyone can Tweet or ReTweet that article from his/her site by signing in to own twitter account. WordPress having plugin for it and I have installed it on my blog also and it works perfectly on my site. There are so many options in its admin panel for its placing before or after post. But I want to place it manually in my site.There are already one option to put it manually on site. To select manually go to Settings then select position : Manually. But after selection there is no instruction come up that how to put that button or which code we have to put in our files to show that button. I also want to put it on different place so i searched about it and i got solution/answer to put tweet meme button manually on site. If you want to put then read instruction below:
– First you have to install TweetMeme WordPress Plugin.
– After that go to settings enter your twitter username to in source. Then select Postion : manual.
– After that If you want to put Tweetmeme button on home page then open index.php of your theme then put tweetmeme code(shown in RED) anywhere after start of
<?php while (have_posts()) : the_post(); ?>
and before
<?php endwhile; ?>
Note :It is must to put Tweetmeme code between this otherwise it will not work.
TweetMeme Code :
<script type=”text/javascript”>
tweetmeme_style = ‘compact’;
tweetmeme_url = ‘<?php the_permalink(); ?>’;
</script>
<script type=”text/javascript” src=”http://tweetmeme.com/i/scripts/button.js”></script>
So your code will look like :
<?php while (have_posts()) : the_post(); ?>
// Other code may be here or after TweetMeme Code
<script type=”text/javascript”>
tweetmeme_style = ‘compact’;
tweetmeme_url = ‘<?php the_permalink(); ?>’;
</script>
<script type=”text/javascript” src=”http://tweetmeme.com/i/scripts/button.js”></script><?php endwhile; ?>
Now i am explaining what is the meaning of tweetmeme_style and tweetmeme_url.
tweetmeme_style means button type. If you want to show only compact size button then use code same as above or if you want to show normal big button then remove tweetmeme_url = ‘compact’; from that code so your normal big widget automatically shows.
tweetmeme_url – It is used to pass URL or link to be retweeted, means it takes URL of that post or page automatically and whenever anyone tweet it with this button it passes current post or page url and then tweet it via tweetmeme.
Let me know if you have any other problem in it I will try to solve it out. If you have any questions regarding this button then post it in comment. Also if you want to put buttons like my site and customize your blog then you can contact me.