Hi guys, I’m a newbie in WordPress. I am trying to integrate a widget on my site and it tells me to add a script to header.php file but I can’t seem to find the file on my child theme. Should I add the code to the parent theme header.php or I create header.php file in child theme which I don’t know how?
Thanks in advance guys.
Hi kargaelo! First of all, welcome to the community, buddy. I hope you enjoy your stay here.
Regarding your question, I think the easiest way to do this is to create a copy of the template files you want to change from the parent theme, in this case the header.php, then make your modifications to the copied files. This way you will not be affecting or changing the parent files.
For more info about WordPress child themes, you may refer to this documentation.
Hope that helps.
Wow, aldinlapinig! That was quick. I saved time. Thank you for helping out.
Glad to help, kargaelo.
this is the quickest solution i have seen while searching about this topic. thank you for sharing.