Title: Can&#8217;t insert Code in Head
Last modified: November 26, 2022

---

# Can’t insert Code in Head

 *  Resolved [bccn](https://wordpress.org/support/users/bccn/)
 * (@bccn)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cant-insert-code-in-head/)
 * Hello sir
 * I am trying to insert Code in Head but it finally appear in the Body.
 * What can I do, please?
    Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcant-insert-code-in-head%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Aleksandar Urošević](https://wordpress.org/support/users/urkekg/)
 * (@urkekg)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cant-insert-code-in-head/#post-16236683)
 * hi [@bccn](https://wordpress.org/support/users/bccn/),
 * I see you use WP Rocket, so I suppose it moves code injected by Head & Footer
   Code on the `wp_head` hook from head to body.
 * Can you please provide here a screenshot of the HFC head code settings, to check
   what can be done to prevent such behaviour?
 * Thanks,
    Aleksandar
 *  Thread Starter [bccn](https://wordpress.org/support/users/bccn/)
 * (@bccn)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cant-insert-code-in-head/#post-16237941)
 * Hello sir
 * Thank you very much for your response.
 * This is the code, of just one url.
    I have to insert codes like this in all pages
   head, for hareflang tags…
 * <link rel=”alternate” href=”[https://www.decidetucasa.com/planos-casas-pequenas/6×6-metros/&#8221](https://www.decidetucasa.com/planos-casas-pequenas/6×6-metros/&#8221);
   hreflang=”es” />
    <link rel=”alternate” href=”[https://www.decidetucasa.com/fr/plan-petite-maison/6×6-metres/&#8221](https://www.decidetucasa.com/fr/plan-petite-maison/6×6-metres/&#8221);
   hreflang=”fr” /> <link rel=”alternate” href=”[https://www.decidetucasa.com/pt/plantas-de-casas-pequenas/6-x-6-metros/&#8221](https://www.decidetucasa.com/pt/plantas-de-casas-pequenas/6-x-6-metros/&#8221);
   hreflang=”pt” /> <link rel=”alternate” href=”[https://www.decidetucasa.com/en/small-house-plans/20-x-20-house-plans/&#8221](https://www.decidetucasa.com/en/small-house-plans/20-x-20-house-plans/&#8221);
   hreflang=”en” /> <link rel=”alternate” href=”[https://www.decidetucasa.com/en/small-house-plans/20-x-20-house-plans/&#8221](https://www.decidetucasa.com/en/small-house-plans/20-x-20-house-plans/&#8221);
   hreflang=”x-default” />`
 * I dont know how to insert an images here.
 * Thanks a lot
 *  Plugin Author [Aleksandar Urošević](https://wordpress.org/support/users/urkekg/)
 * (@urkekg)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cant-insert-code-in-head/#post-16238117)
 * Hello [@bccn](https://wordpress.org/support/users/bccn/),
 * Okay, I can see that hreflang meta tags are located within the HEAD of your homepage
   [https://drive.google.com/file/d/13U2aa0NhOugRCjP31rvFJ6Y-lrhK0w1L/view?usp=share_link](https://drive.google.com/file/d/13U2aa0NhOugRCjP31rvFJ6Y-lrhK0w1L/view?usp=share_link)
   and also on “escaleras” page [https://drive.google.com/file/d/1NsNYlqLwYFVu_2QYiEnbxROYlNBMG-VL/view?usp=share_link](https://drive.google.com/file/d/1NsNYlqLwYFVu_2QYiEnbxROYlNBMG-VL/view?usp=share_link)
 * So do what you did for the “escaleras” page.
 * Although I would recommend you use some SEO plugins for hreflang meta tags. Head&
   Footer Code can help you to set them all manually, but it’s not the best solution
   as you have to do that manually.
 * Please let me know if you have any further questions,
    Aleksandar
 *  Thread Starter [bccn](https://wordpress.org/support/users/bccn/)
 * (@bccn)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cant-insert-code-in-head/#post-16238223)
 * Hi
 * Well, it is like that.
 * At the beginning, it was working very well. The first codes inserted were fine,
   but them, codes began to appear in the body.
    I have the idea that the issue 
   started when I installed Advanced Ad plugin. Before that, I think the code were
   inserting very well. The first codes I checked out were ok.
 * I have uninstalled Advanced Ads, but the issue goes on. I am almost sure that
   was that one.
    I avoid using pluggins for things I can do manually. I have installed
   about 20 useful plugins, all of them necesary. A lot of plugins affect server,
   page loads speed and other configurations.
 * What can I do Please?
 * Other plugins for inserting codes doesn’t let to insert it in specific page heads
   in website head, and I don’t nee that.
 * I’m going to show, now, an screen shot, about something, I think is an issue,
   I have not seen it before in the head of my website. I think it is strange, and
   very large code. I suppose it was Advanced Ads plugin, but I am not sure of this.
 * I didn’t know this is the way for upload images.
    [https://mega.nz/file/2rxBDRSL#bPiTwxy5w1AMxldWwHzoAx6713NWMQv-hVZzDIaIkQ4](https://mega.nz/file/2rxBDRSL#bPiTwxy5w1AMxldWwHzoAx6713NWMQv-hVZzDIaIkQ4)
 * Could you help please?
    What can I do?
 *  Plugin Author [Aleksandar Urošević](https://wordpress.org/support/users/urkekg/)
 * (@urkekg)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/cant-insert-code-in-head/#post-16240990)
 * Hello [@bccn](https://wordpress.org/support/users/bccn/),
 * Not sure how you concluded that content injected on the page through Head & Footer
   Code plugin is added to the page BODY if you put content to the HEAD textarea
   on HFC plugin settings and individual pages?
    On your screenshot hreflang meta
   tags are within the HEAD of the page, not in the BODY. So that is Okay.
 * Also on your screenshot, there are a lot of meta, link, script and style tags,
   injected by WordPress core, theme and various plugins.
 * As this part of the community forum is only for free support related to the Head&
   Footer Code plugin, I would recommend you post on [https://jobs.wordpress.net/](https://jobs.wordpress.net/)
   to get a developer to help you with your website.
 * Thank you for understanding,
    Aleksandar

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Can’t insert Code in Head’ is closed to new replies.

 * ![](https://ps.w.org/head-footer-code/assets/icon.svg?rev=3299702)
 * [Head & Footer Code](https://wordpress.org/plugins/head-footer-code/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/head-footer-code/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/head-footer-code/)
 * [Active Topics](https://wordpress.org/support/plugin/head-footer-code/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/head-footer-code/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/head-footer-code/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Aleksandar Urošević](https://wordpress.org/support/users/urkekg/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/cant-insert-code-in-head/#post-16240990)
 * Status: resolved