Last night I spent some time searching for the magic code that would embed a Pin it button in each post. My efforts did not go unnoticed by
my friend Google, who happily directed me to my pot of gold.
With the easy-to-follow instructions provided at
LetMeClear.com, I was able to knock this out in under 5 minutes. I bet you could do it in 3.
For fear that these instructions might one day disappear from
LetMeClear.com, I've cut and pasted them here:
Step#1. Go to Design>> Edit HTML, Make a full back up of your template.
Step#2. Click on the Expand Widget Template checkbox on top right of the HTML window.
Step#3. Find this Data tag normally it will be twice in your HTML is given below. Locate the First one.
Step#4. Paste the following code immediately below/after the code mention in Step#3.
<!-- Pinterest Start -->
<b:if cond='data:blog.pageType == "item"'>
<div id='pin-wrapper' style='margin:5px 10px 5px 0; text-align: left;'>
<a
class='pin-it-button' count-layout='horizontal'
expr:href='"http://pinterest.com/pin/create/button/?url="
+ data:post.url'>Pin It</a>
<a href='javascript:void(run_pinmarklet())' style='margin-left:-93px; width:43px; height:22px; display:inline-block;'/>
</div>
<script src='http://assets.pinterest.com/js/pinit.js' type='text/javascript'/>
<script type='text/javascript'>
function run_pinmarklet() {
var e=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);
}
</script>
</b:if>
<!-- Pinterest button End -->
Step#5(Optional). If you want to show Pin It button on the top of each post Place the button code in Step#4, before <data:post.body/> tag.
Step#6. Hit Save and that’s it! Check your blog Button appears or not on your post page.
Source: LetMeClear.com
Thank you
LetMeClear...I've got you bookmarked now.
2 comments:
you are fast becoming an internet guru!
Ha, not really. I'm just at following directions.
Post a Comment