I have my WordPress site. It has one plugin which adds a JavaScript which I don't want to use. I want to remove it from my site using theme.
Tried multiple solutions like added hook in function file to dequeue the script but doesn't work for me.
I have my WordPress site. It has one plugin which adds a JavaScript which I don't want to use. I want to remove it from my site using theme.
Tried multiple solutions like added hook in function file to dequeue the script but doesn't work for me.
You can use the below code with the required changes in the theme's function file.
Refer to the documentation for more info
add_action( 'wp_enqueue_scripts', 'remove_thrive_appr_main_script' );
function remove_thrive_appr_main_script() {
wp_deregister_script( 'handle-of-style' );
}
Note - 'handle-of-style' = handle of style (You have to replace it with your own one)
I hope this will help you.