Created
March 31, 2015 12:43
-
-
Save thecodepoetry/3bfb8ad46a7a1e40527f to your computer and use it in GitHub Desktop.
Load main.js from child theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_enq_childminjs() { | |
wp_dequeue_script( 'dt-main', get_template_directory_uri() . '/js/main.js', array( 'jquery' ), false, true ); | |
wp_register_script('dt-main', get_stylesheet_directory_uri() . '/js/main.js', array('jquery'),false, true); | |
wp_enqueue_script('dt-main'); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_enq_childminjs' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code goes in child theme functions.php