Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.