If I wanted to put the scripts that all my plugins use at the end of the page, where would I do this?
Using YSlow/Firebug it recommends this tactic.
Leave a Reply
You must be logged in to post a comment.
If I wanted to put the scripts that all my plugins use at the end of the page, where would I do this?
Using YSlow/Firebug it recommends this tactic.
You must be logged in to post a comment.
The hook for registering the script in the footer is:
be sure to look at this and this, both are important.
One way – make use of queue.
wp_register_script()
accepts parameter that bumps queued scripts to footer. The issue is that not all plugins use queue (they really should) and many that do don’t bother to target footer. So you will need to hook and do a lot of registrations and re-registrations.Another way is using good caching plugin (like W3 Total Cache) that is capable of moving and even concatenating scripts.