Advertise on Site! You can Advertise on our site. Find out More

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

3 Flares Twitter 3 Facebook 0 Google+ 0 StumbleUpon 0 LinkedIn 0 Buffer 0 Filament.io 3 Flares ×

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.

3 Flares Twitter 3 Facebook 0 Google+ 0 StumbleUpon 0 LinkedIn 0 Buffer 0 Filament.io 3 Flares ×
  • http://www.whatareyoulookingat3232 Vivian Towns

    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!

  • http://www.youproblog.com/cb-predator/cb-predator/ CB Predator

    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

  • http://www.fauzulbahari.com Fauzul

    nice tutorial. it seems so easy to implement.

  • http://loselefantesdf.com Arturo Gil

    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!

    • sony

      What you are trying with this path…I did not get you. send me the full details.

    • http://intensedebate.com/profiles/purab Wordpressapi

      What code you are writing in your widget..send me details…so I can reply

  • http://url360.Me/Aq5 stephan

    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

  • http://intensedebate.com/profiles/purab Wordpressapi

    use following code
    <img src"<?php TEMPLATEPATH .'/images/your_image.png ?>" >

    this will solve your issue

  • casy mear

    hello,

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

  • http://4c46ectlvi8n4sdfr9eetx7n0s.hop.clickbank.net/ lose weight fast

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

  • http://geeklish.com Brodie Beta

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

  • http://www.payweb.org create a free website with free space

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

  • http://www.creditcardnet.org/0-credit-cards/ 0% Credit Cards

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

  • http://www.twitter-follow.co.uk twitter

    Cool website, thanks for sharing the info!!

  • Steve

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

  • http://electric-cigarette.biz Electric cigarettes

    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!

  • http://blog.schertz.name jdscher

    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);

  • http://mobilethemesworld.net/ TheShadow

    Thanks for sharing.I use official tweet count button but it shows 0 count always.why?

3 Flares Twitter 3 Facebook 0 Google+ 0 StumbleUpon 0 LinkedIn 0 Buffer 0 Filament.io 3 Flares ×