Posted By

morg7801 on 01/12/12


Tagged

wordpress head


Versions (?)

Add custom JavaScript to from a post


 / Published in: PHP
 

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

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

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

Report this snippet  

You need to login to post a comment.