Site logo

[Resolved] Override inc/structure/header.php

Home Forums Support [Resolved] Override inc/structure/header.php

Home Forums Support Override inc/structure/header.php

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1398400
    Daniele

    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

    #1398757
    David
    Staff
    Customer Support

    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.

    #1400215
    Daniele

    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

    #1400399
    David
    Staff
    Customer Support

    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.

    #1400412
    Daniele

    with before_header it worked!
    thanks

    #1400460
    David
    Staff
    Customer Support

    Glad to hear that.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.