CrossPixelNation
CrossPixelNation NYC

Better script loading for WordPress

It was really bothering me that jQuery was loading twice on every page that included the lovely Democracy plugin, so I looked into it and realized that there is a way to prevent that in most cases.  WordPress has a whole folder of plug-and-play libraries that are just waiting to be included with the wp_enqueue_script function.  Toss it in your functions.php file and it will inject the scripts into wp_head().  You can specify dependencies and the path to your own file location, making sure that they pop up in the proper order. Anything that makes WordPress load faster and with fewer glitches is worth looking into.

Leave a Reply

Comment spam protected by SpamBam
(9 spam filtered)