Home Forums WoodMart – Premium Template Add code to header when using child theme

This topic contains 5 replies, has 2 voices, and was last updated by Aizaz Imtiaz Awan Aizaz Imtiaz Awan 1 week, 6 days ago.

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

    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

    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

    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)

You must be logged in to reply to this topic.