Add pin code

Hi

I want to add the Pintrest code to my website, but am not sure how and where to add.
Can I simple add it in my css? How can I make sure it’s above the ?

Thanks a lot!

This is the description from pintrest

To use add-ons on your page all you have to do is add some JavaScript. You only need to include this script once per page, no matter how many buttons or widgets you use. Adding the script more than once may cause problems on your page.

To immediately load our JavaScript, include this just above your closing tag:

https://developers.pinterest.com/docs/widgets/getting-started/?

Hi Nimue,

You have several options to do this.

First is to you use a third party plugin like Insert Headers and Footers. Once you install this plugin, you can place the Javascript code in the footer area in the plugin settings:

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

Another option would be to login through FTP and go to wp-content/themes/x-child then add this code to the functions.php file:

function wpb_hook_javascript_footer() {
    ?>
<script
    type="text/javascript"
    async defer
    src="//assets.pinterest.com/js/pinit.js"
></script>
    <?php
}
add_action('wp_footer', 'wpb_hook_javascript_footer');

Hope this helps.

yes thanks!!!

You’re welcome, Nimue.

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