The MU forums have moved to WordPress.org

Simple way to make footer load ALL scripts? (2 posts)

  1. demoshane
    Member
    Posted 14 years ago #

    Yes, I made post earlier about wp_head call wondering if it could be customized. Seems Im that bad newbie to php and wordpress that I can't find way to do it so I ask if someone has found out way that would remove js loading from header (not css like moving wp_head to footer screws css on top -rule)

    So is there any function that would call all plugins js and basic js's wordpress has and could be called from footer to make page load faster?

  2. richs0914
    Member
    Posted 14 years ago #

    As far as I know...

    Each plugin tells where it should hook into, either wp_head or wp-footer.

    Some plugins give you the option in the admin section of where the script should load (ie. Google Analytics Plugin)

    But the only way to get the others to load where you want it to is to either go into each plugin and edit where it hooks into, and in some cases you might have to write another function so that the css goes into wp_head and the javascript goes into wp_footer.

    Or if you're really adventurous, you can take the page source of your site and copy all of the css into your header, and all of the javascript into your footer, and then delete wp_head and wp_footer out of your theme. But keep in mind that everytime you upgrade or add a plugin (or delete one) you must edit your theme to place the new css and js files addresses.

    But, there's no easy way that I know of.

About this Topic

  • Started 14 years ago by demoshane
  • Latest reply from richs0914