I am using v1.4.1 of PowerMag theme and Appearance > Theme Options > Custom Javascript is inserting the code into the footer instead of the header.
How would I fix this? (and I'm assuming future versions of PowerMag will remedy it as well)
I see no other way to add the header code save to manually edit my header.php file (which is undesirable)
The majority of scripts with a few exceptions should be loaded in footer for performance reasons, hence the decision. You can load scripts in header by adding something like this in functions.php (e.g. after line 317)
One big one is Google DFP code, which is required to appear before the banner. There doesn't seem to be any way to add code into the header without a plugin or a template modification. That kills all banners. I can make it work by changing the templates, but even your description of the "Custom Javascript" field indicates that it woudl insert into the header, not the footer.
After the "Performance update (1.2)" all scripts outputs have been moved in footer, I forgot to change the description honestly. By the way you surely have a point, I will add a textarea to output scripts in header too in next update, in the meantime you can load the scripts in header manually while waiting for the update.
Hi there,
The majority of scripts with a few exceptions should be loaded in footer for performance reasons, hence the decision. You can load scripts in header by adding something like this in functions.php (e.g. after line 317)
I'll consider adding a textarea to load JS back in header though.
djwd
Regards
djwd
One big one is Google DFP code, which is required to appear before the banner. There doesn't seem to be any way to add code into the header without a plugin or a template modification. That kills all banners. I can make it work by changing the templates, but even your description of the "Custom Javascript" field indicates that it woudl insert into the header, not the footer.
Food for thought.
After the "Performance update (1.2)" all scripts outputs have been moved in footer, I forgot to change the description honestly. By the way you surely have a point, I will add a textarea to output scripts in header too in next update, in the meantime you can load the scripts in header manually while waiting for the update.
Thanks for your feedback
djwd
Regards
djwd