How to show tweetmeme button and facebook share button with the_excerpt function.

Sponsors

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.

facebook-twitter

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.

You may like following Articles!

19 thoughts on “How to show tweetmeme button and facebook share button with the_excerpt function.

  1. Awesome blog and i should totally take notice with you on this one here. Its hillarious, thats what i can say about this post. Because this is what this whole site is all about right? Keep on doing a great job!

  2. Dreamweaver has been my personal goto program for years. I really do not know what I would do with out it. There were occasions when I first began using the software, and I believed it was way too sophisticated. Now I fly around it, and it has become an asset in my tool box. Anyhow thanks for the write-up.

  3. Really Good! I like your blog, its layout is really fine. Keep it up!
    Visit my site to check how I add 5000 friends in 7 days and get huge traffic to my site everyday.
    Thanks

  4. I dont know what to say. This really is certainly one of the much better blogs Ive examine. Youre so insightful, have so much actual things to bring for the table. I hope that a lot more people examine this and get what I got from it: chills. Fantastic job and wonderful web site. I cant wait to understand a lot more, retain them comin!

  5. Here’s how to get it to work in version 1.9, by adding the 2nd line and commenting out the 3rd line. Identical to this articles directions but also includes the ,8 at the end of the enabled add_filter lines.

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

Leave a Reply