To get this, go to the image on your website, right-click (ctrl-click on Mac) the image and select 'Copy image URL'. Then paste this URL into the 'URL of Image to Pin' field, using right-click (or ctrl-click on Mac).
We have rated pinterest-pin-it-button as Good (current version safe) which means that we have found vulnerabilities in older versions.
The standard Pinterest button code (which you can generate here), is an <a>
tag wrapping an <img>
of the Pinterest button.
If you don't include the pinit.js
script on your page, this <a>
tag will work "as-is". You could improve the experience by registering your own click handler on these tags that opens a new window with appropriate dimensions, or at least adding target="_blank"
to the tag to make it open clicks in a new window.
The tag syntax would look like:
<a href="http://pinterest.com/pin/create/button/?url={URI-encoded URL of the page to pin}&media={URI-encoded URL of the image to pin}&description={optional URI-encoded description}" class="pin-it-button" count-layout="horizontal">
<img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" />
</a>
If using the JavaScript versions of sharing buttons are ruining your page load times, you can improve your site by using asynchronous loading methods. For an example of doing this with the Pinterest button, check out my GitHub Pinterest button project with an improved HTML5 syntax.
If you want to create a simple hyperlink instead of the pin it button,
Change this:
http://pinterest.com/pin/create/button/?url=
To this:
http://pinterest.com/pin/create/link/?url=
So, a complete URL might simply look like this:
<a href="//pinterest.com/pin/create/link/?url=http%3A%2F%2Fwww.flickr.com%2Fphotos%2Fkentbrew%2F6851755809%2F&media=http%3A%2F%2Ffarm8.staticflickr.com%2F7027%2F6851755809_df5b2051c9_z.jpg&description=Next%20stop%3A%20Pinterest">Pin it</a>
I had the same question. This works great in Wordpress!
<a href="//pinterest.com/pin/create/link/?url=<?php the_permalink();?>&description=<?php the_title();?>">Pin this</a>
For such cases, I found very useful the Share Link Generator, it helps creating Facebook, Google+, Twitter, Pinterest, LinkedIn share buttons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With