• 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!

    https://www.ads-software.com/plugins/wp-external-links/

Viewing 1 replies (of 1 total)
  • Pi Zi

    (@freelancephp)

    Added an option in version 1.50 to load JS file in the footer (and CSS file has been removed).

Viewing 1 replies (of 1 total)
  • The topic ‘Load CSS and JS in footer’ is closed to new replies.