I'm trying to optimize some wordpress sites for speed etc...I have one site where remnants of a plugin are still around..It's called five9 chat and it's showing up when I do a performance test but I can't seem to find where it's coming from in the source files.
…SocialWidget/five9-social-widget.min.js(app.five9.com)
Any idea on where to find this and remove it from running on my site?
CodePudding user response:
check the page source code and check the id of that script.
example :- <script src='//cdn.jsdelivr.net/npm/[email protected]/dist/js/select2.min.js?ver=1.0.0' id='select2js-js'></script>
then id should be 'select2js'.
then add the following code in your theme function.php file to dequeue that script. Note :- replace script id.
<?php
function wpdocs_dequeue_script() {
wp_dequeue_script( 'select2js' );
}
add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 );