I used the function below to eliminate the render-blocking JavaScript for one script. I have multiple scripts that need to be processed the same way. How do I do that? Need to add these scripts:
https://***.com/wp-includes/js/jquery/jquery.js
https://***.com/…includes/js/jquery/jquery-migrate.min.js
https://***.com/…-content/themes/enfold/js/avia-compat.js
<?php
function add_custom_tooltip(){
?>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “https://***com/wp-includes/js/jquery/jquery.js”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_tooltip’);
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/