Support Center

How do I add a Pinterest button to my product pages?

Last Updated: Mar 09, 2012 02:48PM EST

Shopify cannot add Pinterest buttons for you to your theme. This is a general guide because each theme is coded differently which means the exact placement of your code will differ. If you are struggling with this tutorial, reach out to your designer or to our community.

Option 1: Easy level

Shop Connection is a FREE app in the App Store that can be used to add buttons like Pinterest. (Apps are supported by the their creators so if you have any issues, email fraser@getwillet.com)

Option 2: Difficult level

Here you're going to install the button code into your theme.

Fortunately you don't need a Pinterest account to get a button on your site. If you would like an account you can get one here: http://pinterest.com/landing/

This is the code for a Pinterest button:

<a href="http://pinterest.com/pin/create/button/?url={{ shop.url }}{{ product.url }}&media={{ product.featured_image | product_img_url: 'compact' }}&description={{ product.description | strip_html | truncatewords: 20 | escape }}" class="pin-it-button" count-layout="horizontal">Pin It</a>

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

All we need to do here is create a snippet in our theme editor to house this button. If you already have some social buttons in your product page you may either already have a snippet or a section in your product.liquid template for social sharing buttons. Check your theme and use your judgement.

Now just paste our button code into the snippet:

All that's left now is to include the snippet in our product.liquid template where you would like the button to appear using the liquid include tag like so:

{% include 'pinterest' %}

Contact Us

  • Or call 1.888.746.7439
    Phone Support Hours
    • Monday - Friday 9am - 9pm EST
    • Saturday 9am - 5pm EST
    • Sunday Closed