WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Chirag Vora
    Member
    Posted 8 months 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

    http://wordpress.org/plugins/scripts-to-footerphp/

  2. Joshua David Nelson
    Member
    Plugin Author

    Posted 8 months 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
    Member
    Posted 8 months 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
    Member
    Plugin Author

    Posted 8 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic