function child_script() { wp_dequeue_script( 'ct-fullwidth-optimizer' ); wp_enqueue_script('ct-fullwidth-optimizer', get_stylesheet_directory_uri() . '/js/ct-fullwidth-loader.js', false, false, false); wp_dequeue_script( 'ct-scripts' ); wp_enqueue_script('ct-scripts', get_stylesheet_directory_uri() . '/js/functions.js', array('jquery', 'ct-form-elements', 'odometr', 'ct-sticky', 'jquery-dlmenu'), false, true); } add_action('wp_enqueue_scripts', 'child_script', 9999); The parent has an app.js file. Can I create my own app.js file in the child thread so that it interrupts the previous one? that is, it will not even load but will be taken from the child theme? Added the first version of the code, nothing has changed. Then I tried version 2 of the code and the scripts just stopped working. They will not connect with a child thread.
add_action( 'wp_print_scripts', 'de_script', 100 ); function de_script() { wp_dequeue_script( 'ct-fullwidth-optimizer' ); wp_deregister_script( 'ct-fullwidth-optimizer' ); wp_dequeue_script( ' ct-scripts' ); wp_deregister_script( ' ct-scripts' ); }