show tweetmeme button and facebook share button

I created custom wordpress theme. In that theme I am using the_excerpt method for showing the post on some pages.
I installed the tweetmeme and facebook-share-new plugins and activated on wordpress site.
I saw one issue with these plugins. These plugins are showing on only single pages or posts.

show tweetmeme button and facebook share button
show tweetmeme button and facebook share button

Facebook and twitter button are not showing when I am using the the_excerpt() function.

I tried google but I did not got any suaitable answer. Everybody is saying about do mannual work when we creating the post.

So did checked the these plugins and I found the solution.

First I am taking about tweetmeme plugin. I opened the “tweetmeme.php” file. This file you will find in wordpress plugins and tweetmeme folder.

Add following code to line no 721 and comment the following line.

add_filter(‘the_excerpt’, ‘tm_update’);
//add_filter(‘get_the_excerpt’, ‘tm_remove_filter’, 9);

Add following code to line no 129
remove_action(‘the_excerpt’, ‘tm_update’);
tweetmeme
When you done with changes you will be able to see tweetmeme button with wordpress post excerpt also.

Updated tweetmeme.php file you can download from here. Please right click and choose save as option.

Now I am going to talk about facebookshare plugin. I opened the facebookshare.php file. This file you will find in wordpress plugins facebook-share-new folder.

Add following code to line no 843

add_filter(‘the_excerpt’, ‘fb_share’);

When you done with changes you will be able to see facebookshare button with wordpress post excerpt also.

Updated facebookshare.php file you can download from here. Please right click and choose save as option.

How to add twitter follower logo on blog

If you have twitter acctount, just login to that account and go to bottom page twitter page and click on or just click on following link.

How to add twitter follower logo on blog

http://twitter.com/goodies/buttons

Choose any botton as per your choise and click on that.

How to add twitter follower logo on blog
How to add twitter follower logo on blog

Copy the code from the text box and paste that code in your blog’s widget- text widget. That sit.

Have fun!

How to show Twitter Followers Count on wordpress widget

We all are having the twitter account. If we want to show Twitter Followers Count on wordpress widget then just use our code.

How to show Twitter Followers Count on wordpress widget

Open your sidebar.php file and just copy paste the following code.

First you would need to create a file twitter.php and paste the following code in there:


<?php

//This xml file will return the all user information about from twitter account
$xml=file_get_contents('http://twitter.com/users/show.xml?screen_name=wordpressapi');
if (preg_match('/followers_count>(.*)</',$xml,$match)!=0) {
$twitter_follower_count['count'] = $match[1];

// this will show the twitter followers count
echo $twitter_follower_count['count'];
?>

WordPressapi is my twitter username. So you can change it your username.