
As the title says this is a Dynamic Pin it Button. which will first grabs the image from settings. if it is not available not available, then it will pull the first image from the article. If there no image found in the Article then it take the Default image from settings, and it also adds a Description from the post with 500 characters (max length on Pinterest).
How to Add the Pinterest Pin It Button to Blogger?
Adding Pin It Script for Blogger
- Login to Blogger Dashboard > Choose your Blog and Click the More Options Dropdown
- Select the Template > Click on Edit HTML > Proceed
- Check/Tick the Expand Template Widgets checkbox
- Search for
</head>
and place the below code before it!
<script type="text/javascript" src="http://bloggerblogwidgets.googlecode.com/svn/trunk/w2b_blogger_pinit.js"></script>
Adding Pin It Button Script
- Search for
<data:post.body/>
- Place the Bellow Pin It Button script before or after it- If you add the below code before the
<data:post.body/>
then it will appear the Before the Post Content.
- If you add the below code after the<data:post.body/>
then it will appear the After the Post Content.<b:if cond='data:blog.pageType == "item"'> <div expr:id=""w2bPinit-" + data:post.id" style="display: none;visibility: hidden;height: 0;width:0;overflow: hidden;" class="w2bPinitButton"> <data:post.body/> <script type="text/javascript"> w2bPinItButton({ url:"<data:post.url/>", thumb: "<data:post.thumbnailUrl/>", id: "<data:post.id/>", defaultThumb: "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipmVlKTBjeOUo_XNXm5Sm6XDFrHzjduyK3Jm5jvwYJ1ChOlSIa6B94AGR_EnbGYDAHPncmp2OJaaEwTQTi3fXYgIBBjzN8ZwVnv3MrL8wp1lT8GzAfAS_bME6VX8uUmbYKjcqOkmj1GIMb/s1600/w2b-no-thumbnail.jpg", pincount: "horizontal" }); </script> </div> </b:if>
Settings defaultThumb
Set the Default Thumbnail Image URL. pincount
Set the Pin it Count Style. Options verticle
horizontal
none
Adding Stylings
Add the below styling before]]></b:skin>
tag..w2bPinitButton{
float: left; /* Customize left/right */
margin-right:10px; /* Customize margin-left/margin-right */
display: block;
padding:4px;
}
Customize the Float and Margin properties according to your need.I hope this Pin it Button is helpful to you. Please share it with your Friends and Leave your Comments.
No comments:
Post a Comment