Stay updated!
Subscribe to our Newsletter and get notified on latest releases.
Learn how to easily add a Pinterest “Pin It” button to your WordPress blog with three simple methods. Whether you prefer using code, a plugin, or Elementor, this guide covers all the options to help you encourage readers to share your content on Pinterest and increase your blog's visibility.
Adding a Pinterest “Pin It” button to your WordPress blog is a smart way to encourage readers to share your content directly to Pinterest. This not only increases your content’s visibility but also drives more traffic back to your site. Below, I’ll cover three simple methods to add a Pinterest “Pin It” button to your blog—whether you’re comfortable with code, prefer plugins, or use Elementor for customization. Let’s dive in!
Adding the Pinterest “Pin It” button manually is straightforward and doesn’t require a plugin. Follow these steps to add the button directly to your theme’s files.
The Pinterest button requires JavaScript to function. Add this snippet to your WordPress theme’s functions.php file, or place it in a site-specific plugin:
function add_pinterest_script() {
?>
<!-- Pinterest Script -->
<script async defer src="https://assets.pinterest.com/js/pinit.js"></script>
<?php
}
add_action('wp_head', 'add_pinterest_script');
This code makes sure the Pinterest script loads on every page, enabling the “Pin It” button.
Next, you’ll need to add the button itself within your blog posts. Open your single.php file (responsible for individual post layouts) and place the code below where you’d like the button to appear:
<a href="https://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&description=<php the_title_attribute(); ?>" class="pin-it-button" count-layout=`horizontal'>Pin It</a>
That’s it! This creates a working Pinterest button, allowing users to share each post’s URL and title directly to their boards.
If you’re looking to add the Pinterest “Pin It” button to specific pages, posts, or even images across your entire WordPress blog, a plugin can handle it all—no coding required. Here’s how to set it up using the Pinterest Pin It Button On Image Hover plugin.
With this plugin, you have full control to add the “Pin It” button site-wide, to specific pages, or on individual images, letting you meet your readers’ needs wherever they interact with your content. This approach is perfect for blog websites looking to maximize Pinterest engagement on any page.
If you're an Elementor user, you can easily add a Pinterest “Pin It” button directly to specific pages, posts, or sections of your site without any additional coding or plugins. Elementor provides flexibility for custom layouts, allowing you to place the button exactly where it’s most effective.
<a href="https://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink()); ?>&description=<?php echo urlencode(get_the_title()); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a> <script async defer src="https://assets.pinterest.com/js/pinit.js"></script>
This code above creates a “Pin It” button that users can click to pin the page or post directly to Pinterest.
Using Elementor gives you precise control over the button’s placement and makes it easy to feature Pinterest sharing options in key locations on your site without using plugins or extensive code edits.
With these three methods, you have flexible options to add a Pinterest “Pin It” button to your WordPress blog. Whether you prefer a simple code-based solution, want an easy plugin option, or need full design control with Elementor, there’s a method here to suit your needs. Adding this button doesn’t just make your blog more shareable—it’s a step toward building a stronger, visually connected audience on Pinterest.
You might also like
Create captivating effects such as scroll-triggered animations, smooth transitions, and other interactive elements by integrating GSAP with Elementor. Their smooth combination will deliver an immersive, professional user experience that leaves a lasting
Separating the header from the body in HTML is essential for creating organized, maintainable web pages. It’s crucial to know how to define and style the header and body elements independently. With practical tips, you can enhance your website's structure
Can you push specific pages within WordPress? Absolutely! There are some practical methods, like manual exports, migration plugins, staging environments, and database tweaks, to enhance individual pages