Return to Snippet

Revision: 54802
at January 12, 2012 10:09 by morg7801


Initial Code
<? if( is_single() and
       $customjs = get_post_meta($post->ID, 'custom_js', true) )
   echo "<script src='".$customjs."' language='javascript'></script>";
?>

Initial URL
http://wordpress.org/support/topic/add-custom-javascript-to-ltheadgt-from-a-post

Initial Description
Another source: http://wpswitch.com/blog/wordpress/an-introduction-to-wordpress-custom-fields/

Initial Title
Add custom JavaScript to  from a post

Initial Tags
wordpress

Initial Language
PHP