Reply To: JavaScript Error preventing Gravity Form function

Home Forums WordPress Themes – Premium Celestial (Celestial Reloaded) JavaScript Error preventing Gravity Form function Reply To: JavaScript Error preventing Gravity Form function

#22303
Sushil Adhikari
Moderator

Hi there,

First activate child theme and Go to sitefolder->wp-content->themes->celestial_child->Functions.php . Then add this following code on functions.php templates.

/**
 * Dequeue the jQuery UI script.
 *
 * Hooked to the wp_print_scripts action, with a late priority (100),
 * so that it is after the script was enqueued.
 */

function celestial_child_dequeue_script() {

  wp_dequeue_script( 'celestial-bootstrap-st' );
  
}
add_action( 'wp_enqueue_scripts', 'celestial_child_dequeue_script', 100);

/**
 * Proper way to enqueue scripts and styles
 */
function celestial_child_enqueue_scripts() {
	wp_enqueue_script('celestial-bootstrap-js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js', array('jquery'), '2.2.2', true);
	wp_enqueue_script('celestial-bootstrap-st', get_template_directory_uri() . '/js/celestial-bootstrap-st.js', array('jquery','celestial-bootstrap-js' ), '2.2.2', true);
}

add_action( 'wp_enqueue_scripts', 'celestial_child_enqueue_scripts',999 );

Note: You can see this tutorial for reference How to use child theme?. and we are emphasizing to use child theme so your changes will not lost on theme update.

Thanks