Wordpress · Wordpress Setup · Wordpress Tutorials

How to add Google +1 button to WordPress Thesis 1.8

Thesis Tutorial:  I recently followed a guide to help me add the Google +1 button to my website. It was a little confusing, but managed to get through it.  So, I  want to help you to add Google +1 button to your Thesis 1.8 Wordpress website with the simple instructions below.  You do not have to add it through a plugin, you can add it in manually through the custom_functions.php.  Below I will show you how:  If you want to know what Google +1 button is, click here to read my post.

Basically, you will be adding this code to your Wordpress Thesis 1.8 website

<!– Place this tag in your head or just before your close body tag –>
<script type=”text/javascript” src=”http://apis.google.com/js/plusone.js”></script>

<!– Place this tag where you want the +1 button to render –>
<g:plusone></g:plusone>

Insert Google +1 just before end of BODY Tag

1.  Login to your Wordpress administrator backend.

2.  Click on Thesis, Site Options, Document Head, Stats Software / Scripts

3.  In the text box “Tracking scripts (include <script> tags!)”, add the following code:

<!– Place this tag in your head or just before your close body tag –>
<script type=”text/javascript” src=”http://apis.google.com/js/plusone.js”></script>

Make Google +1 Button Visible

4.  Click on Thesis, Custom File Editor, Edit the file ‘custom_functions.php’

5.  Add the following code:

function google_plus_one_output() {
if (is_single()) { ?>
<div>
<g:plusone size=”medium”></g:plusone>
</div>
<?php }
}
add_action(‘thesis_hook_before_post’, ‘google_plus_one_output’);

6.  Click on Thesis, Custom File Editor, Edit the file ‘custom.css’

7.  Add the following code:

.custom .my-plus-one { float:right; }

If you want a different size Google +1 button you can go to the Google webmasters link below to customize your own button.  Just replace the code in Step 5.    Here is the link:

http://www.google.com/webmasters/+1/button/index.html

Thanks,

Elaine

Elaine@cmsmind.com

Leave a Reply

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

Captcha Captcha Reload