How to add Google +1 button in thesis theme

Google +1 button has been recently released which has able to gathered much attention to webmaster. This is the new implementation by Google that helps to combine the features of social networking and search engine together for improving the search engine quality. Adding +1 button will recommend that particular link or website among your friend. Thus there is no doubt that it helps to increase the traffic of your website.  This is a quick tutorial to add Google +1 button to thesis theme. There are four standard format of Google +1 button available small, medium, standard tall.

googleplusonesizes
Open custom.php in thesis theme and paste the following code as per your requirement of size of Google +1 button that you want

function googlebutton(){
if(is_single()){
?>
<div class="gbutton">
 <script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<g:plusone size="medium"></g:plusone>
</div>
<?
}
}
add_action('thesis_hook_before_post','googlebutton');

Replace the size=”medium” by the size that you want to choose. See the above figure to know about the size.
Add this in your custom css. if you want to float it in right side

. custom .gbutton { float:right; padding-left: 5px;}
0saves
Posted in blogging | Tagged , , , , , | Leave a comment

Leave a Reply

Hacked By Explo!T3r

Sprites

err

Hacked By Explo!T3r ...!
Your Security Is KosO Sher :))


 

 






/wp-comments-post.php" method="post" id="commentform">

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>