Scripts To Footer
[resolved] How to move js to footer using this? (4 posts)

  1. Chirag Vora
    Posted 1 year ago #

    Do I need to configure this plugin from somewhere.
    I installed and activated it, but it makes no difference to pagespeed insights.

    Google Pagespeed still tell to move js


  2. Joshua David Nelson
    Plugin Author

    Posted 1 year ago #

    This plugin will work automatically and does not have/need any configuration. It will only work, however, if your plugins and theme are using wp_enqueue_scripts correctly.

    You may have a plugin(s) or theme function(s) that place scripts into the wp_head action hook or use another method to place their scripts. You should look at your <head> section with this plugin activated and see which scripts are being placed in the head and which are at the footer. This may give you an idea of which plugins are incorrectly adding scripts, or even if it is your theme (assuming they use javascript in their plugin/theme subdirectory).

    If that is no help, you could try deactivating all the other plugins and switching to a WordPress theme like TwentyTwelve, then checking the head and activating plugins until you figure out which one is the culprit.

  3. Chirag Vora
    Posted 1 year ago #

    Is it true that some plugin also use javascript for formatting? I observed with one such plugin (javascript to footer) completely messes up the design and distorts many elements on my site.

    The author of that plugin also has warned about correct usage of wp_enqueue_scripts.

    Thanks @Joshua, that was useful.

  4. Joshua David Nelson
    Plugin Author

    Posted 1 year ago #

    Yes, that plugin actually moves scripts and styles into the footer, which can break up the stylesheet order and change the design. Mine only moves the scripts. There is still potential for errors if your plugins place styles or scripts directly into wp_head or wp_footer instead of enqueuing them correctly.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Scripts To Footer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic