Forums
Forums / Plugin: External Links - nofollow, noopener & new window / Load CSS and JS in footer
(@cbogdan)
12 years, 3 months ago
Hi! I need to know if its posible to have this feauture on plugin, to get css and js in the footer! For better loading and high SEO score I have to do this, to move all js and css in footer side.
On my functions.php i put
remove_action('wp_head', 'wp_print_scripts'); remove_action('wp_head', 'wp_print_head_scripts', 9); remove_action('wp_head', 'wp_enqueue_scripts', 1); remove_action('wp_head', 'wp_enqueue_style', 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('wp_footer', 'wp_enqueue_style', 5);
All the scripts are down now, only wp-external-links css is still up in head area!
thx!
http://wordpress.org/plugins/wp-external-links/
(@freelancephp)
Added an option in version 1.50 to load JS file in the footer (and CSS file has been removed).
The topic ‘Load CSS and JS in footer’ is closed to new replies.