Support » Plugin: Head & Footer Code » Header and Footer Code On Pages and Posts

  • Resolved designdrumm


    Could you please update your plugin to instead of having “Article specific” checkboxes in the admin area to instead have a text area on the page or post edit page?

    For instance, I go to edit my home page and below where you enter in html, there are two text areas titled: Page Header Code and Page Footer Code. When I enter in code in these areas, it applies that code to only the loading of that page or post.

    If the above could be implemented, I believe your plugin would be at the forefront of inline script management. One could use these areas to inline enqueued scripts and such. Lending the ability to optimize a website for things such as google pageSpeed and GMetrix at a developer level.

    Great plugin! Look forward to the next update!


Viewing 8 replies - 1 through 8 (of 8 total)
  • Also, if you could add the ability to insert enqueued scripts from other plugins and themes, into either the header section or footer section per page or post or in the header and footer admin area, that would make your plugin the best on WP IMO… (: ))


    Oh man, I totally didn’t install this plugin right or something. Now when I hit the checkboxes for article specific code, the text areas I described above ARE already on the edit page! DOH!

    So never mind about that! (: P)

    However my second suggestion still stands, but may be more appropriate in just the admin area. Not sure. I am looking for a plugin to grab any enqueued scripts loaded on a page and place them in the footer. Thought it would be nice if there were a list of scripts being loaded per page and you could select which ones you wanted loaded in the header or footer area coupled with what is entered into the text areas.

    Something like…

    jQuery: __ Header __ Footer
    jQuery-migrate: __ Header __ Footer
    wp-embed: __ Header __ Footer

    Sorry for the other noise… should have checked better before posting.


    Hello designdrum,

    First I wish to thank you for using my plugin and taking time to contact us.

    I’m not sure that I understood your request well, so let me elaborate both of them.

    1) On global settings you have head and footer textareas. If you insert code thrre, code will be printed on all post types choosen on global setings (checkboxes to enable plugin for posts, pages, etc).

    Then on single article page (post or page) you can add new code in textareas on edit page, and that additional code can be appended to global code, or it can replace global code for individual post/page.

    2) Your second request is more for Autooptimize and other caching/optimizing plugins than for my plugin, which does not touch other plugins or theme output/enqueueing.

    Kind regards,

    Hi urkekg,
    Yes, I figured out 1 after and apologized for the noise.

    For 2, yes Autoptimize does what you’re saying. I just thought it would be a nice
    addition to your plugin if users could add any scripts to the header or footer on a per page basis with your plugin.

    If you see my edit to my prior post, that may explain a bit better.
    Noticed you had commented before I got to submit.

    Yes, I saw that you figured out #1 after I submited reply 🙂 so one is done 🙂

    I wish to keep this plugin light and very simple, w/o preferences to become Swiss knife and have billion tweaks and optimizations and mess with task specific plugins (like optimization is). That’s why I actually do not have one textarea for JS and second for CSS in head sections (what other plugins have).

    I know that W3 Total Cache have minification option to minify/combine only specific scripts and CSS, and even to move scripts to head or footer of page (just not by handle but by asset URL).

    Anyway, thank you very much for sharing good idea with us. I wish to advise you – ping it to autooptimize plugin authors, maybe they consider implementation of it.


    Kind of like what WP Optimize It does, but opposite. Wp Optimize lets you set what scripts you Don’t want loaded on a page or post.

    Oh not asking for you to make your plugin an optimization plugin.

    Just add a list like what WP Optimize It does, that lets a user add those scripts to the header or footer code set by your plugin in the background. Basically just enqueuing them with your enqueue. Well that is my idea anyway. Not sure how easy/hard/obfuscated that may be.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Header and Footer Code On Pages and Posts’ is closed to new replies.