Suppose you need to optimize the loading site to move all styles and scripts in the footer, except jquery.
How to do it right? Here is the code that moves the styles and scripts to the footer, but after that the console gives an error: jQuery is not defined

 function footer_enqueue_scripts(){ 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); } add_action('after_setup_theme','footer_enqueue_scripts'); 

The same question as how to make all styles move to the footer, except for the desired style, i.e. so that a certain style remains in the hat?

    0