[Support request] How to create a header.php file inside the Child theme

Home Forums Support [Support request] How to create a header.php file inside the Child theme

Home Forums Support How to create a header.php file inside the Child theme

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #668714
    Birhon

    Hello,

    I have a multisite
    I am trying to find out how i would be able to add a header.php and footer.php file inside the Child theme
    where I will be able to store my header information (logo or banner Main menu and secondary menu) and footer information.
    This way it will allow me to make changes once in the php file and take effect on all my sites on my multisite network.

    I have seen this done before but I need to see it done on the generatepress child theme

    Thank you

    GeneratePress 2.1.4
    GP Premium 1.7.2
    #668913
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You would need to copy the header.php file in the parent theme, and paste it into your child theme.

    Then you can make whatever necessary changes in there.

    Once you do that, I believe you can network activate the child theme so it’s active across all of your sites.

    Let me know ๐Ÿ™‚

    #674557
    Birhon

    Thank you for that
    Another thing, if this does not work for me
    Is there another way I could make the child theme have a multisite header and footer?
    I need to be able to store the header and footer information in the child theme
    So that with every site activation all the information will be available.
    And with any new information, I will need to change it on the PHP file in the child theme
    Or is there a better way?

    #674632
    Birhon

    Hello,

    In other words, I would like to be able to hardcode in the header/footer.php file

    I was not able to find the header and footer on the main theme
    could you direct me to it?

    Thank you so much for all your help.

    #674856
    Tom
    Lead Developer
    Lead Developer

    What changes are you wanting to make? You can use functions to filter their output, and add those functions to your child theme.

    #688907
    Birhon

    Hello, Tom

    I am trying to set up a multisite network
    One that will allow me to share a global header and footer through the network

    Global Header
    Top menu
    Banner, logo and/or slider
    Main Menu

    Local Content

    Global Footer
    Textbox
    Footer Menu
    Textbox

    What would it be the best way to do it using your framework?

    One way I have seen it done was hardcoding the header and footer content on a PHP file
    this way the header and footer will be ready with every site activation.

    #689078
    Tom
    Lead Developer
    Lead Developer

    Yea, I think that would be the only way to do it.

    How would the menus be shared among the sites?

    #1693871
    Dana

    Hi Tom, when you copy header.php to the child theme do you keep all of the code? Or just the pieces you’re editing? I’m adding an Adobe font to the header.

    Thanks!

    #1693873
    Leo
    Staff
    Customer Support

    You need to copy all the code ๐Ÿ™‚

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