Here’s a quickie small tip for wordpress blog users.

If you want to add your own facebook, twitter and Google +1 buttons to your blog post, simply add the following code to your functions.php of your current theme:

add_filter ('the_content', 'insertMeShare');
function insertMeShare($content)
global $post;
$link = urlencode($post->guid);
$content.= '<a href="" data-count="horizontal">Tweet</a><script type="text/javascript" src=""></script>';
$content.= '<iframe src=";href='.$link.'&amp;send=false&amp;layout=button_count&amp;width=110&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:21px; float: relative; " allowTransparency="true"></iframe>';
$content.= '<g:plusone></g:plusone><script type="text/javascript" src=""></script>';
return $content;

This code above can be modified further as a wordpress plugin so as to not modify your current theme (especially if your theme is one of those ready made themes which has an update feature). I have made mine to be a wordpress plugin and I am using this now as my current social share buttons – see the end of my post as an example of these in action. Have fun!

One thought on “How to Add a Facebook, Twitter and Google +1 Button to Your WordPress Blog”

Leave a Reply

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *

This site uses Akismet to reduce spam. Learn how your comment data is processed.