I use a theme to build an portfolio.
I´d like to add an pinterest "pin-it button" into the fuctions.php: Facebook, Google+ an Twitter were done, just the pinterest won´t work.
Can´t found the the wrong code. This ist my code:
function share_this($content){
if ( is_singular( 'portfolio' ) ) {
$content .= '<div class="share-this">' .
/* Facebook */
'<div class="facebook-like-button">' .
'<iframe src="http://www.facebook.com/plugins/like.php?href='. urlencode( get_permalink( $post->ID ) ) .
'&layout=button_count&show_faces=false&width=200&action=like&colorscheme=light&height=21"' .
'scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:21px;" allowTransparency="true"></iframe>' .
'</div>' .
/* Pinterest */
'<div class="pinterest-it-button">'
'<a href="http://pinterest.com/pin/create/button/?url=<?php echo get_permalink(); ?>&media=<?php echo get_thumbnail(); ?>
'&description=<?php the_title(); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a>
'<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>'.
'</div>' .
/* Googgle+ */
'<div class="plusone"><g:plusone size="medium" href="'.get_permalink().'"></g:plusone></div>' .
/* Twitter */
'<div><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a></div>' .
'</div>';
}
Thanks
plugins <=> function(s)
, I meant to say that a plugin basically constitutes one or more functions. So, you should NOT really worry about using plugins. What you should worry about is, finding a well coded and well maintained plugin. :)