Skip to content

Instantly share code, notes, and snippets.

@amyunus
Created November 16, 2012 03:30
Show Gist options
  • Save amyunus/4083780 to your computer and use it in GitHub Desktop.
Save amyunus/4083780 to your computer and use it in GitHub Desktop.
Register and enqueue script in WordPress
<?php
function enqueue_script_in_wordpress()
{
wp_register_script( 'first-script', '/to/the/file' );
wp_register_script( 'second-script', '/to/another/file' );
// not like this
// wp_register_script( 'custom-script', '/to/the/file' );
// wp_register_script( 'custom-script', '/to/another/file' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment