Link to "pin it" on pinterest without generating a button
For such cases, I found very useful the Share Link Generator, it helps creating Facebook, Google+, Twitter, Pinterest, LinkedIn share buttons.
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>
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>
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.