Created
November 5, 2012 21:54
-
-
Save clarklab/4020621 to your computer and use it in GitHub Desktop.
WordPress conditional JS enqueue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (is_page('Contact')) { | |
wp_register_script( 'contact-form', 'http://ajax.googleapis.com/contact-form.js'); | |
wp_enqueue_script( 'contact-form' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment