Follow the link below for a details article on how to Async your site's JavaScript.
https://kinsta.com/blog/google-pagespeed-insights/
/*function to add async to all scripts*/ function js_async_attr($tag){ # Add async to all remaining scripts return str_replace( ' src', ' async="async" src', $tag ); } add_filter( 'script_loader_tag', 'js_async_attr', 10 );
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article