/ Published in: PHP

URL: http://hereswhatidid.com/2013/01/move-gravity-forms-jquery-calls-to-footer/
Gravity Forms by default will write an inline JavaScript call to jQuery on every form you add to a page.
Expand |
Embed | Plain Text
/** ******** ******** ******** ******** ******** ******** ******** ******** * TITLE: Gravity Forms Error * DESCRIPTION: Gravity Forms by default will write an inline JavaScript call to jQuery on every form you add to a page. * * http://hereswhatidid.com/2013/01/move-gravity-forms-jquery-calls-to-footer/ */ //Get Rid of Gravity Scripts function wpdocs_dequeue_script() { //UserPro jQuery if(is_front_page()){ //Remove existing jquery wp_deregister_script('jquery'); wp_dequeue_script('jquery-ui-core'); } //UserPro jQuery UI wp_deregister_style('userpro-jquery-ui'); wp_dequeue_style('userpro-jquery-ui'); } add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 ); //Push Gravity Forms Launch to the Footer function init_scripts() { return true; } add_filter('gform_init_scripts_footer', 'init_scripts', 100);
You need to login to post a comment.