Archived topic
Any feature to add code snippets in headers/footer/anywhere?
1 reply · Started by mc on December 27, 2019
I would like to add code snippets to all headers/footers across my site. I know you can add CSS with the customize option, but I don't feel comfortable adding code snippets there and I'm not sure if javascript works there.
I'm trying to add stuff like favicons/google analytics into the header. I know it can be done with other plugins, but would prefer not to install more plugins.
Hi there,
for adding code such as Google Analytics to the WP_Header or adding <scripts> to the footer you can use the Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/