Content MarketingSocial Media & Influencer Marketing

Add a Pinterest Pinit Button to WordPress

Pinterest is on quite an upswing in popularity… so much so that other social sharing sites are starting to lose some ground. I believe the advantage of Pinterest is that it’s a visual medium that’s well laid out to share information. While other sites have boring lists, the mozaic that Pinterest generates is simple to scroll through to find what captures your interest.

With that in mind, social sharing sites are fantastic traffic generators, so why not make it easy to share your content? Today, we’ve added a Pinterest Pinit button to our WordPress theme. It was pretty simple to do… and we even incorporated pulling the featured thumbnail button as the image URL.

If you would like a Featured Image to display, here’s theme code to add a Pinit button to your theme within the Loop:

<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>

If you don’t want to specify the image, here’s the alternative code:

<a href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a>

Also – be sure to add the Pinterest script to your footer.php

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

For additional information on generating a Pinit button or to take a look at their other apps and features, take a look at the Pinterest goodies page. The folks at Buffer have also described How To Add The Pinterest Pin It Button To Your Blog And Let People Pin Posts With Pictures using the latest version of the Digg Digg plugin.

Douglas Karr

Douglas Karr is CMO of OpenINSIGHTS and the founder of the Martech Zone. Douglas has helped dozens of successful MarTech startups, has assisted in the due diligence of over $5 bil in Martech acquisitions and investments, and continues to assist companies in implementing and automating their sales and marketing strategies. Douglas is an internationally recognized digital transformation and MarTech expert and speaker. Douglas is also a published author of a Dummie's guide and a business leadership book.

Related Articles

Back to top button
Close

Adblock Detected

Martech Zone is able to provide you this content at no cost because we monetize our site through ad revenue, affiliate links, and sponsorships. We would appreciate if you would remove your ad blocker as you view our site.