Saturday, May 12, 2012

How To Add Pinterest Pin It Button To Blogger Post



In case you are unfamiliar, Pinterest is an online pinboard that allows users to share images they find over the web -by “pinning” them on their boards.  A description and original link location are added to the pinned image, giving users the chance to visit the source directly.
A Pin It button is what Like button is to Facebook or Tweet button is to Twitter, as it allows users to share your posts without having to leave your blog. Installing it on each post will surely lets readers pin your posts with ease.
Now let’s proceed with the tutorial:
  1. Go to Design > Edit HTML  (New interface: Template > Edit HTML).
  2. Back up your template.
  3. Check the Expand Widget Templates checkbox on top right of the HTML window.
  4. Look for the following data tag in your HTML. This is the tag for the post content:
    1<data:post.body/>
    Normally there are two instances of the tag present in your template. Locate the the first (from top) one. 
  5. Paste the following code immediately below (after) it: This code is made up of a combination of two different codes -Pinterest’s bookmarklet and Pin It button.
  6. Button configuration
    You can customize the layout of Pin It button & counter by changing the value of count-layout attribute in line 4. Refer to the table below for the available types and their settings.

    Button type
    count-layout value
    margin-left (in line 5) value
    pinterest pin-it button vertical
    vertical
    -46px
    pinterest pin-it button horizontal
    horizontal
    -93px
    pinterest pin-it button no count
    none
    -46px
  7. Button placement 
    The steps above position the button on bottom left of each post. To change the button position, do the following:
    • Position it on top of post 
      Place the button code before <data:post.body/>, instead of after.
    • Button alignment 
      Change the value of text-align property in line 3: 
      Align right: set it to right; 
      Align center: set it to center;
  8. Click Save.
  9. View your blog. The button should appear on post pages.
Update:

Adding Pin It button as a widget

To put Pin It button outside post area e.g in sidebar or footer, paste the following code into a HTML/Javascript gadget. The button will appear on all pages (not just post pages), but it comes without the counter.
01<a href='javascript:void(run_pinmarklet())'><imgsrc="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWRAR8-aedn4zTykfmENTEHOZxkc4Mg3Xt6IOuKCq5PcYiB_hAonDLg3OI-GR7f_4Gn8UEMqGYBwtrnBm0j0opKf_sd1dWe6Q5DUxTpkLiYtdTOEgK9oxVkdJIs49UhaagNjUCA-s6L9Jw/s1600/pinmask2.png"style='margin:0; padding:0; border:none;'/></a>
02<script type='text/javascript'>
03function run_pinmarklet() {
04    var e=document.createElement(&#39;script&#39;);
05    e.setAttribute(&#39;type&#39;,&#39;text/javascript&#39;);
06    e.setAttribute(&#39;charset&#39;,&#39;UTF-8&#39;);
07    e.setAttribute(&#39;src&#39;,&#39;http://assets.pinterest.com/js/pinmarklet.js?r=&#39; + Math.random()*99999999);
08    document.body.appendChild(e);
09}
10</script>
Enjoy!

4 comments:

Unknown on September 11, 2018 at 3:36 AM said...

Pinwords is a really basic tool, but it’s great if you want to quickly make an image from a quote and add it to your Pinterest account. Pinstamatic actually lets you create a whole bunch of items to add to your Pinterest boards including website snapshots, pins of Twitter profiles and Spotify tracks that you can pin.

Unknown on September 14, 2018 at 9:17 PM said...

Pinwords is a really basic tool, but it’s great if you want to quickly make an image from a quote and add it to your Pinterest account. Pinstamatic actually lets you create a whole bunch of items to add to your Pinterest boards including website snapshots, pins of Twitter profiles and Spotify tracks that you can pin.

Unknown on October 15, 2018 at 12:25 AM said...

Pinwords is a really basic tool, but it’s great if you want to quickly make an image from a quote and add it to your Pinterest account. Pinstamatic actually lets you

create a whole bunch of items to add to your Pinterest boards including website snapshots, pins of Twitter profiles and Spotify tracks that you can pin.

Unknown on October 16, 2018 at 12:11 AM said...

Pinwords is a really basic tool, but it’s great if you want to quickly make an image from a quote and add it to your Pinterest account. Pinstamatic actually lets you

create a whole bunch of items to add to your Pinterest boards including website snapshots, pins of Twitter profiles and Spotify tracks that you can pin.

Post a Comment

 

Tags

Site Info

Followers

blogscenters Copyright © 2009 Blogger Template Designed by Bie Blogger Template