Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Add a "Share This in Google Reader" Button to Your Blogger Posts

Wouldn't it be great if you could add a button to every post that would make it easy for your visitors to share your posts with their friends in Google Reader, even if they don't subscribe to your feed?

The following is instructions to do just that, for Blogger layout based blogs. (Blogger Classic, Wordpress, and basic static HTML page instructions will be posted soon.)

This will require you to edit the HTML of your template. While I have tried to make this as easy as possible, those that don't feel comfortable with this, should not try it.

The button will only show on post pages and not the main page of your blog. It's not wise to do this any other way, as the URL that will be supplied in Google Reader will be the URL of the page in which your button is clicked. If it is on the main page, the post may not be there when someone reads the entry in someone's shared items, and it is likely not to win you any new loyal readers, so use this only on post pages.

I have also added some comments in the code that will make it much easier for you to add addional buttons in the future, and have them appear on all pages or just post pages.

1. On your Blogger Dashboard, click the Layout link for the blog you want to add the button to.

2. At the top of the Layout page, click the link for Edit HTML.

3. Where it says "Backup/Restore Template", click the link that says "Download Full Template" and save the .xml file to your hard drive. This file will help you restore your template, in case anything goes wrong.

4. In the "Edit Template" section, check the box at the top right that says "Expand Widget Templates".

5. Use your browser's search function to find this line:

<div class='post-footer'>

6. Find the 2 lines in your template that look like this:


<div class='post-footer'>

<p class='post-footer-line post-footer-line-1'>

7. Copy and paste the following code between those 2 lines:





<div>

<p>

<!-- things placed after this line will show on all pages -->



<b:if cond='data:blog.pageType == "item"'>

<!-- things placed after this line will only show on post pages -->



<a href='javascript:var%20b=document.body;var%20GR________bookmarklet_domain="http://www.google.com";if(b&&!document.xmlVersion){void(z=document.createElement("script"));void(z.src="http://www.google.com/reader/ui/link-bookmarklet.js");void(b.appendChild(z));}else{}'>

<img alt='Share this in Google Reader' border='0' src='http://appsapps.info/blog/blogspot-layouts/gr-small.png'/>
</a>

<!-- Google Reader Share Item Button END -->

<!-- Do Not Paste Any Code Below This Line -->

</b:if>

</span>

</div>

<!-- Footer Button Codes END -->


8. Click the button at the bottom of the page that says "Save Template".

If you get any red errors, leave a comment stating the specific error message, and I will try to help you out. If you get any errors beginning with "bX-", just try again tomorrow. Sometimes Blogger has issues with itself and waiting a bit can resolve them.

9. Look at your blog. If you have done this correctly, the button should appear on post pages only, and not the main page. Test the button by clicking it on a post and sharing one of your posts in Google Reader.

10. If you would like to add other buttons to the footer of your posts, the comments in the code will help you decide where to put your button codes. One place will show on all pages, and the other will only show on post pages.

11. If you would like a larger button than the one that shows when you use this code, find the word "small" in the file name of the image URL used, and replace it with "large".


This post first appeared on Blogger Tips And Tricks, Seo And More...., please read the originial post: here

Share the post

How to Add a "Share This in Google Reader" Button to Your Blogger Posts

×

Subscribe to Blogger Tips And Tricks, Seo And More....

Get updates delivered right to your inbox!

Thank you for your subscription

×