A theme that I bought is adding unnecessary inline JS code that is not needed in the front page.
/* Scripts - dynamic css */
add_action('wp_footer', 'upme_custom_scripts');
function upme_custom_scripts(){
require_once upme_path . 'js/upme-custom-js.php';
}
I would like to add to my custom.js file an override so that I dont have to edit the core file in case it gets updated. Can this be achieved? if so please show me
I was thinking about overriding the function then registering and en-queueing the js file, but i dont know how to override it.
Thanks
Remove the action: