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 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’);
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.
nice tutorial. it seems so easy to implement.
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!
What you are trying with this path…I did not get you. send me the full details.
hello,
Do you know how to implement with tweetmeme.php Version: 1.8.2 ?
thanks
Thank you so much for this post!! I've been messing around with this for hours. You are a life saver!
This doesn’t seem to work with the newest version of Tweetmeme (1.8.5). Has anyone had luck with this version?
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);
Thanks for sharing.I use official tweet count button but it shows 0 count always.why?