Forked from cfxd/remove_cf7_assets-action_hook.php
Last active
August 29, 2015 14:17
-
-
Save WISHPRO/a6b8b84c2d74c8ab99a1 to your computer and use it in GitHub Desktop.
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 do_action('cf7_before_wp_head'); ?> |
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 remove_cf7_assets() { | |
if(is_front_page()) { | |
return; | |
} | |
add_filter('wpcf7_load_js', '__return_false'); | |
add_filter('wpcf7_load_css', '__return_false'); | |
} | |
add_action('cf7_before_wp_head', 'remove_cf7_assets'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment