- This topic has 5 replies, 2 voices, and was last updated 4 months ago by
Leo.
-
AuthorPosts
-
October 28, 2020 at 6:55 pm #1508693
Jill
Dear Support
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 Regards
October 28, 2020 at 7:13 pm #1508704Leo
StaffCustomer SupportHi there,
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:
https://github.com/tomusborne/generatepress/blob/master/header.phpWhat are you trying to modify in the
header.php
file?A lot of modification can be done with hooks 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 28, 2020 at 7:29 pm #1508713Jill
Hello Leo
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 workwould 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 #1508732Leo
StaffCustomer SupportBy 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?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 28, 2020 at 8:36 pm #1508744Jill
Thanks Leo
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 #1508765Leo
StaffCustomer SupportIt’s not possible to modify that
header.php
file 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?
https://docs.generatepress.com/article/hooks-visual-guide/
https://docs.generatepress.com/article/hooks-element-overview/
https://docs.generatepress.com/article/header-widget/Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.