/ Published in: PHP
Another source: http://wpswitch.com/blog/wordpress/an-introduction-to-wordpress-custom-fields/
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<? if( is_single() and $customjs = get_post_meta($post->ID, 'custom_js', true) ) echo "<script src='".$customjs."' language='javascript'></script>"; ?>
URL: http://wordpress.org/support/topic/add-custom-javascript-to-ltheadgt-from-a-post