Skip to content

Instantly share code, notes, and snippets.

@frankschrijvers
Created April 25, 2016 10:11
Show Gist options
  • Save frankschrijvers/0dd8e484e77a01dcc084993b76203093 to your computer and use it in GitHub Desktop.
Save frankschrijvers/0dd8e484e77a01dcc084993b76203093 to your computer and use it in GitHub Desktop.
Loads Pinterest pin-it script
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Loads Pinterest pin-it script
add_action( 'wp_enqueue_scripts', 'wps_load_scripts' );
function wps_load_scripts() {
if ( is_product() ) {
wp_enqueue_script( 'pin-it', '//assets.pinterest.com/js/pinit.js', array('jquery'), null );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment