Archived topic
Edited header reverted
5 replies · Started by comichouse on August 29, 2018
After the latest upgrade all the edits I did in the header.php reverted back. Is there a way to customize the header without being overwritten by updates?
Hi there,
if you want to make changes to the header.php or any function files, you will need to use a child theme. Child theme functions will remain unchanged on update.
What are you changing to the header.php? It may be possible to achieve without editing the function.
Hi David,
Thanks for getting back to me. I'm adding some lines to assign favicons to different devices and also a Facebook Pixel to track our FB traffic. Both should be in the <head> section.
Cheers,
Hans
Hi there,
you can use GP hooks, scripts can be added to the wp_head, plus their are hooks throughout the site.
Hooks Element
https://docs.generatepress.com/article/hooks-element-overview/
Hook Visual guide:
https://docs.generatepress.com/article/hooks-visual-guide/
OK thanks David, that works!
Thats great, glad i could help