Skip to content

Instantly share code, notes, and snippets.

@jacobwise
Last active August 29, 2015 14:03
Show Gist options
  • Save jacobwise/0a08cbdfeb1e47b36a92 to your computer and use it in GitHub Desktop.
Save jacobwise/0a08cbdfeb1e47b36a92 to your computer and use it in GitHub Desktop.
Shows how to add a separate JavaScript file for the admin screen section of your WordPress Website
<?php
function jw_admin_scripts() {
wp_enqueue_script( 'adminscripts', get_stylesheet_directory_uri() . '/assets/js/admin.min.js', array('jquery'), NULL, true );
}
add_action( 'admin_enqueue_scripts', 'jw_admin_scripts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment