Created
April 27, 2016 13:57
-
-
Save ricksportel/3e3051324010a7ff1c4ec0badfb03225 to your computer and use it in GitHub Desktop.
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 | |
//* Dequeue scripts | |
add_action( 'wp_enqueue_scripts', 'child_themename_dequeue_scripts' ); | |
function child_themename_dequeue_scripts() { | |
//* Plugins scripts: | |
// Contact Form 7 scripts on pages without forms | |
if( !is_page( array( 'contact' ) ) ) { | |
wp_dequeue_script( 'contact-form-7' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code snippet is used at:
https://wphostingblog.nl/
Article(s):
https://wphostingblog.nl/wordpress-website-sneller-maken/