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 availablesmall, medium, standard tall.
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
Add this in your custom css. if you want to float it in right side
. custom .gbutton { float:right; padding-left: 5px;}
0 comments:
Post a Comment