How To Add Pinterest (Pin It) button to Your Blog

As everybody knows that Pinterest is the new upcoming social networking site . In pinterest ,users can pin images, videos ,posts or any web page of their choice. This social networking site can alse be a option to get good a good traffic to your blog. If you pin a web page then description and link of that page is automatically added to pinned images then user can directly access to your web page by clicking on that image or link.

Pin button is like facebook share,twitter share,stumbleupon button to share your website or blog post in pinterest.By adding pin button in your blog help users to share your blog post in pinterest.

How to add Pin Button in WordPress ?

1. Login to your wordpress blog.

2.Then go to Appearance->Editor.

3.In editor ,Go to footer.php and  paste the code given below at right before the closing body tag: </body>

[sourcecode language="css"]
&lt;script type="text/javascript"&gt;

(function() {

window.PinMe = window.PinIt || { loaded:false };

if (window.PinMe.loaded) return;

window.PinMe.loaded = true;

function async_load(){

var s = document.createElement("script");

s.type = "text/javascript";

s.async = true;

s.src = "http://assets.pinterest.com/js/pinit.js";

var x = document.getElementsByTagName("script")[0];

x.parentNode.insertBefore(s, x);

}

if (window.attachEvent)

window.attachEvent("onload", async_load);

else

window.addEventListener("load", async_load, false);

})();

&lt;/script&gt;

[/sourcecode]

<code>[/css]4. Save the file.

Now edit your single.php and copy paste the following code where you have added other social buttons.You can also add this button in your widget also.

<?php $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?>

<a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=<?php echo $pinterestimage[0]; ?>&description=<?php the_title(); ?>" count-layout="vertical">Pin It</a>

Save the file and view your blog.Pin button is now added to your blog.

How To Add Pin Button In Blogspot/Bloggers Blog ?

1. Login to your Blogger’s Blog.

2.Go to Design-> Edit HTML  then Expand Widget Templates by checking checkbox.

3. Search for <data:post.body/>

4. Copy paste the following code just after <data:post.body/>

<a href="http://pinterest.com/pin/create/button/" count-layout="horizontal">Pin It</a>

<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>

About Ravi Badoni

Ravi badoni has been into internet blogging/seo for the past 1 year and owns a blog.His Internet blogging blogs is Blogging tips .You can follow him on Twitter @thefunbooster or join his facebook network facebook.com/thefunbooster.Write Guest Post network. You can also write a guest post for this site. Write Guest Post

, , , , ,

Comments Closed

Comments are closed.
Go To Top