Skip to content

Instantly share code, notes, and snippets.

@cobaltapps
Last active March 7, 2019 02:07
Show Gist options
  • Save cobaltapps/c25b3472e7e613c83a491e3320ebf417 to your computer and use it in GitHub Desktop.
Save cobaltapps/c25b3472e7e613c83a491e3320ebf417 to your computer and use it in GitHub Desktop.
See the full code snippet that enqueues custom scripts through your Child Theme's functions.php file.
add_action( 'wp_enqueue_scripts', 'freelancer_child_enqueue_scripts' );
/*
* Enqueue custom Child Theme scripts.
*/
function freelancer_child_enqueue_scripts() {
/* # Custom Scripts
* To add custom scripts just create a scripts.js file in your root
* child theme folder and use the code below to enqueue it.
*/
wp_enqueue_script( 'freelancer-child-scripts', get_stylesheet_directory_uri() . '/scripts.js', array( 'jquery' ), FREELANCER_CHILD_THEME_VERSION, true );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment