Skip to content

Instantly share code, notes, and snippets.

@bentedder
Last active December 12, 2015 00:59
Show Gist options
  • Save bentedder/4688084 to your computer and use it in GitHub Desktop.
Save bentedder/4688084 to your computer and use it in GitHub Desktop.
/** Enqueue a custom javascript file in functions.php */
add_action( 'wp_enqueue_scripts', 'bt_add_scripts' );
function bt_add_scripts() {
wp_register_script( 'mystuff', get_bloginfo('stylesheet_directory').'/myscripts.js' );
wp_enqueue_script( 'mystuff' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment