Google Speed Test - JS to Footer
Accelerating the site for https://developers.google.com/speed/pagespeed/insights/
One of the solutions I found is to transfer the JS code to the FOOTER of the site. I found this code:
if(!is_admin()){
remove_action('wp_head', 'wp_print_scripts');
remove_action('wp_head', 'wp_print_head_scripts', 9);
remove_action('wp_head', 'wp_enqueue_scripts', 1);
add_action('wp_footer', 'wp_print_scripts', 5);
add_action('wp_footer', 'wp_enqueue_scripts', 5);
add_action('wp_footer', 'wp_print_head_scripts', 5);
wp_deregister_script('jquery');
wp_register_script('jquery', ("/wp-includes/js/jquery/jquery.js"), false, 'all', true);
wp_enqueue_script('jquery');
}
I added this code to fuction.php themes, everything is super, the site became faster to load, and Google is happy. But. Now I do not show Slider Revolution. How to be? Help.
Site: opora-dias.ru
Comments