Support » Plugin: Head & Footer Code » Output before the tag

  • Hi!

    First request:

    Would you mind adding a field that outputs code right after the opening <head> tag?

    It can be used to preload assets 😉

    Second request:

    Would you mind adding a filter to control what the header, body, and footer code injections hook to? Instead of the default wp_header, wp_body_open, wp_footer.

    This will help to control the position of the code to inject if needed.


Viewing 1 replies (of 1 total)
  • Hey @dahmaniadame,

    Thank you for choosing the Head & Footer Code plugin and sending a feature request. Your requests are interesting, just a bit too advanced for casual WordPress users (who just need a simple solution to put things to HEAD and BODY w/o editing template files).

    Re 1st request, that is not possible to achieve without dirty hacks OR requirement to modify theme template file to add custom action hook right after opening HEAD tag. So I suggest instead of hack-ish HFC you add preloads to child theme template files 😉

    Re 2nd request, that is possible but will convert Head & Footer Code to Custom Code Inject plugin and break idea behind the HFC philosophy = “keep it simple” 🙂

    To control when a particular code will be injected we have provided a priority option (not exactly what you mentioned, but very close to it).

    If you would need a custom solution with advanced functions for your project, feel free to contact us at to develop a custom plugin for your project.


Viewing 1 replies (of 1 total)
  • The topic ‘Output before the tag’ is closed to new replies.