I'm having some trouble with my child team and was wondering if anyone would know what can I do regarding my issue.
I have created a child theme from this theme: https://en-gb.wordpress.org/themes/colormag/
I was trying to inject a new area for a widget I created using hooks, on the same div where the header image is displayed. After some testing, I was not being able to do what I wanted so I decided to copy the relevant files from the parent theme into my child theme, make the change and be done with it.
The problem I'm having is in this part. I copied 2 files: header.php
and header-functions.php
, leaving the header file in the root of my theme and creating a similar path for the header-functions file. If you see the image at the end of the post, you will see that the website is using the header file on my child (replacing the parent header file) but it's still using the header-functions file from the parent theme. I have tries different things in order to make the website use my header-functions file instead of the parent file but or it didn't work or it broke my page (blank page).
Does anyone know how can I fix this and make it work correctly (I'm relatively new to the WP website structure).
(Note: In case anyone want to check, the function I'm interested in modifying is the function colormag_header_image_markup( $html, $header, $attr )
on the header-functions.php
)
Many thanks in advance, - Miguel