Steps:

  1. Login to Deshboard
  2. Go Appearence to Editor
  3. Select “functions.php” of your theme
Now, to use buttons one under another at the top of the post or page, paste the following code.
/*-----------------------------------------------------------------------------------*/ /* Social Buttons /*-----------------------------------------------------------------------------------*/ add_action('the_content', 'social_buttons'); function social_buttons($content){ if(!is_feed() && !is_home()) { $social .= '<div class="share-this"> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <div class="plusone"><g:plusone size="medium" annotation="inline" href="'.get_permalink().'"></g:plusone></div> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <div class="facebook-share-button"> <iframe src="http://www.facebook.com/plugins/like.php?href='.urlencode(get_permalink(get_the_ID())).'&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" style="border:none; overflow:hidden; width:450px; height:60px"></iframe> </div> </div>'; } return $social . $content; }
 
To use buttons under the post or page use the following

/*-----------------------------------------------------------------------------------*/
/* Social Buttons
/*-----------------------------------------------------------------------------------*/
add_action('the_content', 'social_buttons');
function social_buttons($content){
 if(!is_feed() && !is_home()) {
 $social .= '<div class="share-this">
<table border="0" width="100%">
<tr>
<td style="border-width: 0px;">
 <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>
 <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</td>
<td style="border-width: 0px;">
 <iframe src="http://www.facebook.com/plugins/like.php?href='.urlencode(get_permalink(get_the_ID())).'&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
</td>
<td style="border-width: 0px;">
 <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
 <div class="plusone"><g:plusone size="medium" annotation="inline" href="'.get_permalink().'"></g:plusone></div>
</td>
</tr>
</table>
 </div>';
 }
 return $social . $content;
}


To use side by side after a post or page use the following
/*-----------------------------------------------------------------------------------*/ /* Social Buttons /*-----------------------------------------------------------------------------------*/ add_action('the_content', 'social_buttons'); function social_buttons($content){ if(!is_feed() && !is_home()) { $social .= '<div> <table border="0" width="100%"> <tr> <td style="border-width: 0px;"> <a href="http://twitter.com/share" data-count="horizontal">Tweet</a> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> </td> <td style="border-width: 0px;"> <iframe src="http://www.facebook.com/plugins/like.php?href='.urlencode(get_permalink(get_the_ID())).'&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21&amp;scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe> </td> <td style="border-width: 0px;"> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <div><g:plusone size="medium" annotation="inline" href="'.get_permalink().'"></g:plusone></div> </td> </tr> </table> </div>'; } return $content . $social; }

After paste the code Click on “Update File”. That's all about this post.