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 might also like

How to set the wordpress post excerpt length to limited characters
How to use the_excerpt in WordPress
Add the Facebook LIKE button to WordPress blogs
How to show recent posts wihout plugin
easy way to Add Facebook Share button on WordPress

21 Responses to “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. Just a quick message to thank you for your joyful post. Do you know where I could find more on the subject? well done. Naomi x

  3. 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.

  4. Fauzul says:

    nice tutorial. it seems so easy to implement.

  5. Arturo Gil says:

    I followed the steps (uploaded icon set to the following path:

    http://loselefantesdf.com/wp-content/themes/Restaurant/images/icons/facebook-128×128.png” />

    But when I implement the text widget on my self-hosted WP blog using your code the only thing i get are those ? icons…as if the widget doesn´t find the image in the path written into the code.

    Any idea of what am I doing wrong? I am quite new to web design. Help!

  6. Arturo Gil says:

    Thanks.

    What I am trying to achieve is the same as you, having a row of social icon buttons on my WP blog, which is self-hosted.

    I found a set of free icons online, and uploaded them to the folder I indicate in my previous comment (inside the “images” folder in my currently installed WP theme, “Restaurant”)

    Then, I added a Text widget from the WP widget dashboard, as indicated.

    Pasted your code and replaced the blog´s URL and icon folder filepath with my own.

    When I open my blog on another window, I can´t see the couple of icons I installed, instead I get a couple of “?” (white interrogation symbol inside a blue square) images, the kind you get when the browser doesn´t find an image.

    When I click on those “?” icons, I get a 404 error, the link seems to be broken.

    So, basically the situation is:

    1. I can´t get the icon images to appear on the blog
    2. I can´t get the links to work

    Where do I have to drop the icons, what is the correct path?
    And how do I manage to get the icons to link properly to my twitter and Facebook fanpage?

    Best,

    Arturo

  7. stephan says:

    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

  8. casy mear says:

    hello,

    Do you know how to implement with tweetmeme.php Version: 1.8.2 ?
    thanks

  9. Hi great site! really cool and can be a new inspirations for me

  10. Thank you so much for this post!! I've been messing around with this for hours. You are a life saver!

  11. SurveyGod says:

    Awesome post. I use a CPA marketing technique to block porn pages until offers are done and make around 4k a month now.

  12. Hey, awesome site! Keep it up! I will be difinatley be coming back in the near future =)

  13. Great, this really is exactly what my wife and I required to learn

  14. There is obviously a whole lot to recognise about this. I think you created some fine things in Features also.

  15. twitter says:

    Cool website, thanks for sharing the info!!

  16. Steve says:

    This doesn’t seem to work with the newest version of Tweetmeme (1.8.5). Has anyone had luck with this version?

  17. Fascinating…and I agree in the most part. Keep up the great work…I will undoubtedly be back shortly

  18. 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!

Leave a Reply

Wordpressapi is developer code book.
wordpressapi on Facebook
© 2010 Wordpressapi. All Rights Reserved. Reproduction without explicit permission is prohibited.