Tuesday, February 21, 2012

How to Add a Pinterest Button to the Top of All Blog Posts in Blogger

Pin It
I have spent hours searching for a way to put a Pin-It button into all of my posts. I could only find a way to put it into the bottom of the post, which I didn't want. I wanted it at the top of my posts so that people can see it and easily "Pin" my post/photos. The easiest tutorial I found was from Julie Ann Art. I modified this a little  and found a way to add it to the top of my posts!

Before starting, back up your template in case you make a mistake!

1. First go into your the "Design" tab, click "Edit HTML", then "Expand Widget Templates" like shown below.


2. Hit Ctrl + F to find the following code:

<div class='post-body entry-content'>

3. Right below that code, place the following code:

<div><a href="javascript:void((function(){var%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());"><img alt="Pin It" class="aligncenter" src="http://img.photobucket.com/albums/v419/green_tea/pin.jpg" /></a></div>

4. Click "Save Template" and that should be it! Hope this helps you!

9 comments:

Everyday Mama said...

Awesome! Thanks! It worked for me :)

Everyday Mama said...

I wanted to tell you also that I added your button to my sidebar :) I love your blog.

SocialStudiesSoubrette said...

I <3 you, lol! Thanks so much. It worked perfectly!

JenMarie said...

You're FABULOUS! THANKS!!

Owen's Mom said...

Thank you so much!

I actually was googling this just the other evening. I had been manually putting it on posts (blech!) This is much better.

Krista @ While He Was Napping said...

Amazing! Thanks so much! I have been looking for a way to do this for months. Just found your blog and can't wait to have a look around. I'm sure I'll be back again. Thanks again!

Krista at
While He Was Napping

Suz said...

I worked!! and i dont' have a clue about html!!
www.sweetsbysuz.blogspot.com

the vintage bricoleur said...

Thank you so much for this post! I found it very helpful... While He Was Napping and Wildberry Ranch sent me over. Terry

Ana Maria Mendez said...

i think i love you
jajaja