Skip to content

Instantly share code, notes, and snippets.

@LucaRosaldi
Created November 28, 2012 11:24
Show Gist options
  • Save LucaRosaldi/4160590 to your computer and use it in GitHub Desktop.
Save LucaRosaldi/4160590 to your computer and use it in GitHub Desktop.
WP: Pinterest Pin It Button
<a href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail' ); echo $thumb['0']; ?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a>
<!-- This goes in the footer -->
<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment