Archived topic
Place this snippet of code just before tag
3 replies · Started by sevite on November 12, 2021
Hi, this should be simple, however I seem to not have it right. I need to insert a snippet "Place this snippet of code just before </head> tag"
I made a hook and chose generate_after_header_content in the Header section, thinking that would be just before </head> tag? When I test at FOMO it says it cannot find it so it must be in the wrong place?
Clearly I'm not a developer.
Thanks
Pam
Hi Pam,
You can use a hook element for this:
https://docs.generatepress.com/article/hooks-element-overview/
The hook you need would be wp_head:
https://docs.generatepress.com/article/wp-head/
Let me know if this helps :)
all is good. thanks. It truly was simple.
No problem :)