Skip to content

Instantly share code, notes, and snippets.

@andyspicer
Created March 15, 2013 11:26
Show Gist options
  • Save andyspicer/5169214 to your computer and use it in GitHub Desktop.
Save andyspicer/5169214 to your computer and use it in GitHub Desktop.
WP - Register / Enqueue Scripts
add_action( 'wp_enqueue_scripts', 'rgp_load_javascript_files' );
// Register our javascript files. We'll enqueue some now and some on specific pages.
function rgp_load_javascript_files() {
wp_register_script( 'rgp-functions', get_template_directory_uri() . '/js/rgp-functions.js', array(''), '', true );
/*wp_enqueue_script( 'info-carousel-instance' );*/
/*if ( is_front_page() ) {
wp_enqueue_script('home-page-main-flex-slider');
}*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment