Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Add Pinterest Pin-it Button Over Your Images in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Add Pinterest Pin-it Button Over Your Images in WordPress

Pinterest is a powerful social networking site that can drive a lot of traffic to your site. If you are running a lifestyle, photography, or portfolio site, then you definitely want to see your images pinned. Previously we showed you how to add a Pinterest Pin it button in WordPress and show your latest pins in sidebar. In this article, we will show you how to add Pinterest Pin it button over your images on WordPress. This button will appear only when the user brings their mouse over your images allowing them to quickly pin that particular image.

An image in WordPress with a Pin It button

First thing you need to do is install and activate the Pinterest Pin it Button for Images plugin. After activation you need to go to Settings » Pinterest Pin it to configure the plugin.

Settings for Pinterest Pin it for Images Plugin

On the plugin’s settings page, you can choose where you want to show the Pin it button on your WordPress site. You can select to show it on all pages, index or home page, single post, etc.

The next option is to choose the default description. You can select from post title, post title and link, post title and site title, etc. This will be sent as image description along with the pinned image.

Pin it button on images in a WordPress image gallery

If you want to exclude some images from showing the Pin It button, then you can add “nopin” CSS class to the images you want to be excluded. When you want to do that, simply switch to Text editor while writing your post and add the CSS class to your image code like this:

<img src="" alt="valley" width="700" height="454" class="nopin alignnone size-full wp-image-1531" />

Pinterest Pin it Button for Images also allows you to disable automatic display of Pin it button. You can selectively display the button only on images with CSS class “pinthis” added to them. To do that, first you need to check the box next to Show “Pin it” button only on images with class=”pinthis” option under the Advanced section on the plugin’s settings page and save your settings.

After that when you are adding an image that you want to have a Pin it button, switch to text editor on the post edit screen and add "pinthis" CSS class to the image code like this:

<img src="" alt="valley" width="700" height="454" class="pinthis alignnone size-full wp-image-1531" />

If you want to add Pinterest or other share buttons on Youtube Videos, then follow this tutorial.

We hope this article helped you add a Pinterest Pin it button for images in WordPress. Let us know how you are using this on your website and which settings you find more effective by leaving a comment below. Also don’t forget to follow Syed Balkhi on Pinterest.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Sheryl says:

    I am using the plug-in which looks great when viewed on a desktop but when viewed on my IPhone the Pinterest icon is NOT on the photos? There appears to be code written blocking it from being displayed on mobile?? How do I find the .php file for this plug-in?

  2. Marius says:

    How can I add a Pin it button on my Product Images?

    This plugin doesn’t do the job for that…

  3. Dominic de Souza says:

    Is it possible to restrict pinning sitewide based on image size? Eg; some css restricting everything under 300px?

    • Bruno says:

      Why has the Pin It link shown up on the web gallery photos I’ve created, without my knowledge or prior permission?

  4. Lacie says:

    Works like a charm! So easy to add using your instructions, thank you!!

  5. Jennifer says:


    Thanks for this article. We have installed this plugin but the pin isn’t showing on the images yet. Are we supposed to do something extra?



  6. Ashley says:

    it doesnt show in gallery pics but only blog posts images?

  7. Jerry Charles says:

    As a suggestion, you might check out the support forum for this plugin. It appears the latest version isn’t working well and there doesn’t appear to be any support for getting issues resolved at the moment because the developer is tied up. I’m not sure what other plugin is better to use, but wanted to point out the issue, which may or may not be temporary I recently installed the new update and it didn’t work.

    • WPBeginner Support says:

      We tested it on WordPress 3.8.1 which is the current stable version of WordPress and the plugin worked flawlessly on our end.

  8. javadth says:

    i prefer to use jQuery Pin It Button For Images

  9. Anirban Pathak says:

    This is a great post. I did as the instructions say and set it so the Pin It button shows on all photos but when I go to my site it doesn show at all.

  10. Jen says:

    Thanks for the tips. I did as the instructions say and set it so the Pin It button shows on all photos but when I go to my site it doesn show at all. Any ideas why this might be?

    • WPBeginner Support says:

      Check your settings again, if everything there is all right then you should post on the plugin’s support page.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.