Here’s a quick way to add the new Google +1 button to a WordPress blog manually.

Step 1: Get Your Code

Pop over to Google’s Page about +1 and select your button style and then copy the code provided into your favourite text editor:

Step 2:  Edit Your header.php File

Navigate to Appearance -> Editor within your WordPress dashboard:

Select header.php from the right hand list of files.

paste the first section of the code into the file just above the </head> element:

Step 3: Edit the single.php file

You’re already within the editor, so simply choose the single.php file from the menu.  This change ensures that the +1 button appears in every post.

Paste the second section of the Google +1 code into the HTML just after the <div class=”entry”>

Step 4: Edit the Main index.php file

This is basically just a repeat of step 3.  Choose index.php from the right hand menu, and find the <div class=”entry”> code in the page.  This change ensures that the +1 button appears in every post that gets listed on your home page.

Paste the second Google +1 code into the HTML as in step 3.

…And that’s it.

Disclaimer:

There are probably already numerous plug ins that will carry out all of the steps above, and if you changed theme after installing your Google +1 button into WordPress using this method, you’d need to do it all again.

Tagged with:
 

Leave a Reply

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>

Set your Twitter account name in your settings to use the TwitterBar Section.