Using the next snippet you will be allowed to de-register and dequeue APP.js or APP.min.js file from parent theme


and to load your own customized or modified app.js file from child from this location :



/* Deregister the APP.JS from parent and loade it from custom location (child theme)*/
function sq7r_deregister_app_js() {
    $min = sq_option( 'dev_mode', 0 ) == 1 ? '' : '.min';
    //Deregister the core theme app script
    wp_deregister_script( 'app');
    wp_dequeue_script( 'app');

    //Register again the script but from child theme for custom changes. 
    //This will pull and use the app.min.js or app.js from wp-content/themes/kleo-child/assets/js/app.js and app.min.js
    wp_register_script( 'app', get_stylesheet_directory_uri() . '/assets/js/app' . $min . '.js', array( 'jquery' ), $version, true );
    wp_enqueue_script( 'app', get_stylesheet_directory_uri() . '/assets/js/app' . $min . '.js', array( 'jquery' ), $version, true );

add_action('wp_enqueue_scripts', 'sq7r_deregister_app_js', 11);

NOTE : The support service will not cover any bug occured in child themes and custom codes.

Log in with your credentials

Forgot your details?