Last active
December 20, 2015 21:59
-
-
Save scottnix/6201993 to your computer and use it in GitHub Desktop.
Adding a script to Wordpress, with page conditional
This file contains 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 | |
// add script to WP with a page conditional | |
// thematictheme.com/forums/topic/adding-javascript-to-style-an-element/ | |
function childtheme_add_shit_to_head() { | |
if ( is_page( 80 ) ) { ?> | |
<script>Script....</script> | |
<?php } | |
} | |
add_filter('wp_head', 'childtheme_add_shit_to_head'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ROTFL! </easily_amused>