Created
October 19, 2015 15:25
-
-
Save contempoinc/1fffccfe9f353ded60fd to your computer and use it in GitHub Desktop.
Dequeue & Deregister Styles and Scripts for Child Theme
This file contains hidden or 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
<?php | |
function PREFIX_remove_scripts() { | |
// Example Dequeue/Deregister animate.min.css | |
wp_dequeue_style( 'animate' ); | |
wp_deregister_style( 'animate' ); | |
// Example Dequeue/Deregister ct.mapping.js | |
wp_dequeue_script( 'mapping' ); | |
wp_deregister_script( 'mapping' ); | |
// Now register your styles and scripts here | |
wp_enqueue_style('childAnimate', get_template_directory_uri() . '/css/animate.min.css', '', '', 'screen, projection'); | |
wp_enqueue_script('childMapping', get_template_directory_uri() . '/js/ct.mapping.js', 'gmaps', '1.0', true); | |
} | |
add_action( 'wp_enqueue_scripts', 'PREFIX_remove_scripts', 20 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment