Home / links / Add pinterest “Pin It” button to your wordpress blog
  • How to Add pinterest “Pin It” button to your wordpress blog


    Adding a pinterest button to a wordress blog is simple! Place the first snippet in the functions.php of your wordpress theme. Once that is done add the next snippet into the location you wish to display the Pint It button within the single.php template file.

    wordpress snippet : PHP - functions.php

    function pin_js(){
       echo '<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>';

    wordpress snippet : PHP

    <a href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&description=<?php the_title_attribute(); ?>" class="pin-it-button" count-layout="horizontal">Pin It</a>

    ( WordPress codex functions, hooks, in this snippet. )

    the_title, the_permalink, init, wp_footer, the_title_attribute, add_action, wp,