Home Forums WoodMart support forum Add code to header when using child theme

Add code to header when using child theme

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

    protectionshopnl
    Participant

    Hello,

    Without using a plugin it is possible to add code to the header of our website as we understand. We are using a child theme.

    How can we add code to the website header? We have to copy the header.php file as we understand to our child theme. What’s the most easy way to do this?

    As we see in the header file of the standard Woodmart theme, the file is already filled with little content. This should be copied along, right?

    Please let me know. Thank you!

    Regards,
    Fabian

    #289677

    Hello,

    The Most Easy way is to add it using a free plugin https://wordpress.org/plugins/insert-headers-and-footers/

    If you want to edit the header.php file directly then you need to copy the header.php file from the main theme to the child theme and then try adding the code in it.

    You can read the following article for further help:
    https://www.wpbeginner.com/plugins/how-to-add-header-and-footer-code-in-wordpress/

    Regards.
    Xtemos Studios

    #289708

    protectionshopnl
    Participant

    Hello Aizaz,

    Thanks. What’s the most easy way to copy the header.php file to the child theme? Via FTP?

    We would like to use less plugins. So that’s the preferred way.

    The content that’s already in the header file needs to be remain there after copying?

    Regards,
    Fabian

    #289744

    Hello,

    You are Most Welcome.

    You can use FTP or Cpanel to edit the header.php file.

    Yes the content already in the header needs to be there.

    Regards.
    Xtemos Studios

    #289748

    protectionshopnl
    Participant

    Hello Aizaz,

    Where do I have to copy the original header.php file to in the child theme folder?

    Usually, after copying editing the header file is also possible in WordPress itself, right?

    Regards,
    Fabian

    #289755

    Hello,

    You need to keep the header.php file in the child theme folder then it will work.

    Regards.
    Xtemos Studios

Viewing 6 posts - 1 through 6 (of 6 total)