- This topic has 5 replies, 2 voices, and was last updated 1 year, 7 months ago by Leo.
October 28, 2020 at 6:55 pm #1508693Jill
To create my site, i had to modify inc>structure>header.php file of parent theme.
so in child theme how i can include that file?
i tried to add that file in child theme (maintaining same structure), but that didnt work
would you mind to kind enough to share me the procedure please?
Kind RegardsOctober 28, 2020 at 7:13 pm #1508704LeoStaffCustomer Support
I tried to add that file in child theme (maintaining same structure), but that didnt work
That’s the correct method. You just need to copy the header.php file and paste it into the child theme folder:
What are you trying to modify in the
A lot of modification can be done with hooks 🙂October 28, 2020 at 7:29 pm #1508713Jill
thanks for your comments
actually it is not main header.php, i am referring inc>structure>header.php of parent theme.
i needed to modify that file, so what i did, i copied that file in child theme. but that didnt work
would you mind to check the screenshot please?
https://www.journalbuddies.com/wp-content/uploads/2020/10/parent-theme-file-in-child-theme.jpgOctober 28, 2020 at 8:13 pm #1508732LeoStaffCustomer Support
By default, WordPress only allows child theme overwrites on the first level of files – so the files directly under the theme folder.
What is that code you are trying to add?
Did the source provide any information on how to add it?October 28, 2020 at 8:36 pm #1508744Jill
that is some buttons i wanted to add. and i am coding it using html and css.
i need to add those code in inc>structure>header.php ( as i shown in red block)
so can i add or you can help from theme support to include that file as a part of child theme?
or it is not possible?October 28, 2020 at 9:36 pm #1508765LeoStaffCustomer Support
It’s not possible to modify that
header.phpfile like that and I don’t think it’s necessary at all.
Where would you like the buttons to appear?
Have you considered using hooks or widget area?
- You must be logged in to reply to this topic.