Created
February 6, 2019 11:45
-
-
Save linksyncjameshwartlopez/2557b01f1795e91a24c87bc398ae4d8f to your computer and use it in GitHub Desktop.
Remove a javascript using dequeue
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
<?php | |
/** | |
Remove sorting js from gal because its giving issue to wordpress admin | |
**/ | |
function wpdocs_dequeue_script() { | |
if(is_admin()){ | |
//Only remove the script if the page is admin | |
wp_dequeue_script( 'sorting-woocommerce-prosorting-woocommerce-pro' ); | |
} | |
} | |
add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 200 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment