Embedded pin

Hi,
I want to embed a pin from pintrest:
https://developers.pinterest.com/tools/widget-builder/?type=pin&url=https%3A%2F%2Fwww.pinterest.co.uk%2Fpin%2F508554982922390273%2F&terse=true

How can I make it work?

So far I used the
https://developers.pinterest.com/tools/widget-builder/?type=pin&url=https%3A%2F%2Fwww.pinterest.co.uk%2Fpin%2F508554982922390273%2F&terse=true

and tried to add it with a text element, raw code element… but the pin doesn show.

Thank You!
Nimue

Hello Nimue,

Thanks for writing in!

To properly insert the Embedded Pin, please do this:

1.) Insert a raw element into the page in Cornerstone.
2.) Use the provided code for the raw content element. In your case, you use this:

<a data-pin-do="embedPin" data-pin-terse="true" href="https://www.pinterest.co.uk/pin/508554982922390273/"></a>

3.) Find the JS section in the left panel and insert this:

</script><script async defer src="//assets.pinterest.com/js/pinit.js">

You might wonder why the script code is not the same as what is provided by Pinterest. It is because normally when the page is viewed live, the output in the footer is:

<script id="cornerstone-custom-content-js" type="text/javascript"></script>

And adding the script directly like this will create an issue because of the broken script code result:

<script id="cornerstone-custom-content-js" type="text/javascript"><script async defer src="//assets.pinterest.com/js/pinit.js"></script></script>

Which is why we have to use the modified script code as <script async defer src="//assets.pinterest.com/js/pinit.js"></script><script async defer src="//assets.pinterest.com/js/pinit.js"> so that on the front end, it will be like:

<script id="cornerstone-custom-content-js" type="text/javascript"></script><script async defer src="//assets.pinterest.com/js/pinit.js"></script>

This result will not create any issues nor conflicts and the Embedded Pin should display in one of the raw content elements on your page.

Hope this clear things up.

Thank you @RueNel RueNel for this MOST amazing explaination!!!

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.