Archived topic
Override inc/structure/header.php
5 replies · Started by Daniele on August 12, 2020
Hi guys,
I need to override this file in my child theme inc/structure/header.php to add some content inside #masthead container.
So I replicated the folder structure in my child theme, but the original file is always called.
Can you explain me how to override this particular file?
thanks
Hi there,
Instead of creating a new header template - you can use the Hook Element to insert content:
https://docs.generatepress.com/article/hooks-element-overview/
Let us know if you need help with that.
Hi David,
I tried with before_header_content.
The problem is that the output is inside "inside-header"
but I would like to output it directly inside #masthead because I would like to stretch it a little more:
https://imgur.com/HpKz6D7
Does it have to be inside the Masthead ?
You could use the before_header hook.
If it has to be inside the masthead then share a link by editing your original topic and adding it to the site url field. And ill take a look.
with before_header it worked!
thanks
Glad to hear that.