Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
FAW Enqueue script in functions.php of WordPress
//* Enqueue Scripts
add_action( 'wp_enqueue_scripts', 'load_toggle_javascript' );
function load_toggle_javascript() {
wp_enqueue_style( 'dashicons' );
wp_enqueue_script( 'toggle', get_stylesheet_directory_uri() . '/js/toggle.js', array( 'jquery' ), '1.0.0' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment