Add custom JavaScript to from a post

/ Published in: PHP
Save to your folder(s)

Another source:

Copy this code and paste it in your HTML
  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


RSS Icon Subscribe to comments

You need to login to post a comment.