Skip to content

Instantly share code, notes, and snippets.

@bradpotter
Last active December 20, 2015 22:09
Show Gist options
  • Save bradpotter/6202920 to your computer and use it in GitHub Desktop.
Save bradpotter/6202920 to your computer and use it in GitHub Desktop.
Enqueue Secondary Menu Script
/**
* Register and Enqueue Secondary Navigation Menu Script
*
* @author Brad Potter
*
* @link http://www.bradpotter.com
*/
function gst_secondarymenu_script() {
wp_register_script( 'secondary-menu', get_stylesheet_directory_uri() . '/js/secondarymenu.js', array('jquery'), '1.0.0', false );
wp_enqueue_script( 'secondary-menu' );
}
add_action('wp_enqueue_scripts', 'gst_secondarymenu_script');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment