How To Add A Pinterest Pin It Button To WordPress Website

SkyStra
Apr 18, 2021

Pinterest is one of the most popular social media platforms on the Internet, and it’s used solely to share visual content. This separates it from other social media platforms such as Facebook or Twitter, which support all media types making Pinterest unique. Pinterest is also one of the biggest search engines on the web.

With its 700 million users and 500,000 brands, Pinterest should definitely be on your radar as an SEO builder and website traffic source. 

Pins on Pinterest are considerably more shareable than a post on any other social media platform. It’s been found that pins are 100x more shareable than a regular tweet since visual content is shared more than text nowadays. A standard pin on Pinterest leads to an average of 6 page views and 2 site visits. 

To get the most out of Pinterest, you’ll need a Pinterest for Business account (which is free). Pinterest for Business allows you to manage a campaign, see analytics, run promotions, and much more.

Get Noticed On Pinterest 

Here are some quick tips on how to reach your fullest potential with Pinterest to get noticed and drive traffic to your website: 

Avoid Hashtags

Hashtags are essential on most social media platforms these days, but they don’t work as well on Pinterest. Since Pinterest is in essence a search engine itself, hashtags can often be complicated and inefficient on pinners. Most marketing experts recommend staying away from hashtags, and if you have to use one – use only a hashtag with your brand name.

Incorporate Rich Pins

Rich pins offer additional features which, on average, bring 100% more engagement than regular pins. The most popular rich pin on Pinterest is a product pin, and you also have article, movie, place, and recipe rich pins to choose from. For example, product rich pins allow your audience to buy your products directly from pins. You can provide additional information such as real-time pricing and inventory status in them.

Use A/B Testing

While there’s tons of information on Pinterest marketing, we recommend running your own multivariate and A/B tests to see what works best. Use advanced analytics in Pinterest for Business to find which pins bring the most traffic and better engagement and start from there.

Avoid Clickbait Call-To-Actions

Users on Pinterest behave differently from other social media platforms, and research shows that they don’t appreciate direct sales campaigns and promotions. Instead, we recommend using carefully curated images with keywords in their descriptions. That way, your marketing is subtle, and Pinterest users won’t get blasted with direct ads and sales promos. You can use A/B testing to see which length for descriptions work best (shorter – up to 30 words, or longer descriptions between 100-200 words).

Promote Your Lifestyle

Pinterest is all about lifestyle, so if you want to reach your audience – you need to establish one. We recommend working with influencers to build your brand faster on Pinterest and using Pinterest board directories to find popular boards in your niche and post there (Pingroupie, for example). 

How To Add A Pin It Button To Your WordPress Website

Pinterest no longer uses Pin It as its button name, it was renamed to Save back in 2016. Some WordPress plugins still use Pin It instead of Save in their name, but they perform the same function.
The most straightforward way to add a Pinterest Save button to your website is by using a social media sharing plugin. We recommend using Shared Counts, which is one of the best social media plugins for WordPress. It’s free, and it allows you to easily add Pinterest and other social media platform buttons to your website.

Activate Shared Counts

Log in to your WordPress Dashboard, head to Plugins > Add New, fill in Shared Counts in the top-right search field, and click Install Now:

Once installed, click Activate to activate the plugin:

Configure

Next, head to Settings > Shared Counts to configure the plugin:

As you can see, the plugin is straightforward to configure. Choose your social media buttons in the Share Buttons to Display option (Pinterest is added by default, and you can choose to keep or remove Facebook and Twitter or add more networks), select the buttons visual style, location, and post type.

Once ready, click Save Changes to save the changes.

Visit any post on your website to see the button bar in action:

Another benefit of using the Shared Counts plugin is that you can also use the free Pinterest Image addon, which allows you to set a custom Pinterest sharing image and a description optimized for Pinterest.

Manually Adding A Pin It Button

Some advanced users prefer to avoid using a plugin for everything and might want to add a Pin It button to their website manually.

To do this, we need to adjust the theme’s footer.php file. Edit the footer.php file using your favorite plain text editor (such as Notepad), and paste this code before the </body> tag:

<script type="text/javascript">
(function() {
    window.PinIt = window.PinIt || { loaded:false };
    if (window.PinIt.loaded) return;
    window.PinIt.loaded = true;
    function async_load(){
        var s = document.createElement("script");
        s.type = "text/javascript";
        s.async = true;
        s.src = "https://assets.pinterest.com/js/pinit.js";
        var x = document.getElementsByTagName("script")[0];
        x.parentNode.insertBefore(s, x);
    }
    if (window.attachEvent)
        window.attachEvent("onload", async_load);
    else
        window.addEventListener("load", async_load, false);
})();
</script>

Please save the file and re-upload it to your website.

Next, edit the single.php file in your theme’s folder, and add the following code in the location where you want the button to appear in your post:

<?php $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?>
<a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=<?php echo $pinterestimage[0]; ?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="vertical">Pin It</a>

This code shows the Pinterest button with your posts feature image, title, description, and post URL in the share URL feature.

If you want to show the horizontal share button instead of vertical, change the count-layout parameter to horizontal value.

Pinterest Button Shortcode

Shortcodes are perfect for adding dynamic content to your WordPress posts, pages, and widgets. You can create a Pinterest Button Shortcode and then manually add the button to your daily content.

Edit your theme’s functions.php file and paste the following code:

function get_pin($atts) {
$pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
return '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink($post->ID)) . '&media=' . $pinterestimage[0] . '&description=' . get_the_title() .'" class="pin-it-button" count-layout="vertical">Pin It</a>'; }
 
add_shortcode('pin', 'get_pin');

Once completed, you can use the [pin] shortcode in your posts and pages in a location where you want to show the button.

Final Words

Pinterest is a unique social media network that can bring a lot  of traffic to your website.  You should definitely consider investing time to develop your lifestyle profile and share content on it as well to grow your website traffic.