Pinterest's official hovering "Pin It" buttons have improved in 2014 — there are more button options, and they load faster than ever. And, in the year since I wrote my original tutorial, I've come up with a few new code snippets to help you control where the buttons appear on Blogger blogs. Since there's so much new stuff to tell you, it's time for a brand new tutorial. Let's get started!
What You'll Learn
This tutorial will show you how to add the official hovering Pin It buttons to your Blogger blog. The buttons will show up in the upper left corner of your post images when your readers hover over the images.
These buttons work on all Blogger templates except Dynamic Views, which doesn't accept customization. The buttons appear on images with a minimum width of 200px and a minimum height of 100px. Smaller images are skipped.
Get the Code
To get your own button code, go to the Pinterest Widget Builder (opens in a new window).
Make sure that the "Button Type" option is set to "Image Hover", then choose your favorite button style.
You get a choice of small or large rectangular buttons in gray, white, or red, or small or large round buttons in red. You can preview each button style to choose the right one for your blog.
Once you've chosen your button style, copy the code in the grey box below the preview image to your clipboard.
Back Up Your Template
From your Blogger dashboard, go to "Template" and click the "Backup/Restore" button in the top right corner. Save the .xml file somewhere safe.
Open the Template Search
Next, open your template by clicking the "Edit HTML" button below your "Live On Blog" screenshot.
We're going to use the template search feature to search your code. Your browser's search function can't search the code, so be sure to follow these directions exactly.
- Place your cursor on the template code.
- Click once.
- Press CTRL and F at the same time (PC) or Command and F (Mac).
The search box will open in the upper right corner of the template editor.
Enter </body> in the search box, then press enter. The code will "jump" to the </body> tag in your template and highlight it in yellow.
Add the Code
Immediately above the </body> tag, enter the code you got from Pinterest.
Before you save your template, remove the word "async" from the code. This is important, your template will not save unless you remove the word "async".
Press the orange "Save Template" button up top to save your template. Then, go look at your blog. You should see the Pin It buttons you chose in the upper left corner of your images when you hover your cursor over each image. Nice, right?
For most blogs, that's all you need to do. Enjoy your buttons!
Advanced Options: Removing Unwanted Buttons
If you have buttons showing up where you don't want them to be, don't worry; you have options!
Remove the Button From Specific Post Images
If you want to take the Pin It button off of an image or two in a post or on a static page, you can use the "nopin" attribute. To "nopin" an image, switch over to the HTML view of your post or page, and find the img src HTML markup for the image you'd like to "nopin". It will look something like this:
Enter nopin="nopin" right before the closing slash and angle bracket of your image element, like this:
When you save your post, the Pin It button will disappear from that image.
Remove the Buttons from a Group of Post Images
Sometimes you'll want to remove the Pin It button from a large group of images in a post or static page. After an initial setup, this method will let you "nopin" larger groups of images quickly.
Save your template. Nothing will change yet; this code is the foundation for the next bit of code you'll use.
Now, switch to the HTML editor of the post with the group of images, and find the code for the first photo in the group. It will look something like this:
Add this line immediately above that first image:
Then, find the last image in the group. Its code will look very similar to the code for the first image. Immediately below the last image, enter this closing div tag:
There's a shortcut if you want to remove the button from all of the images in a single post — just add the first div tag above the first line of your post, and the closing div tag below the last line of your post. All of the images inside that div will lose their buttons.
Remove the Pin It Button from the Header
If the Pin It button appears on your header and you'd like to remove it, you can do it with a little snippet of code!
First, back up your template again. Then, find the </body> tag again, and enter this code snippet directly above the