Query about Modifying Header File
-
I have a child theme which I’ve implemented, which works okay, but I need to display a banner in the header section (i.e. at the top of the page), where there is no widget area. The idea is that I use a custom field to identify some aspect of the page, and then display a banner according to that value.
So, I found that I could copy header-main.php into /my-child-theme/parts/, and add some additional code which identifies the field value and then queries a non-WP database. This works okay too. No problems.
However, I realize that when the main theme gets updated my header-main.php file (in the child theme) will not get updated, which could later cause issues.
So, I’m wondering if there is a better way or, rather, a correct way of achieving what I’m attempting to do, taking account of the fact that I need the banner to be in a specific place in the header section? Or is the method I’m using the best way already?
Any suggestions/help appreciated. Thanks!
- The topic ‘Query about Modifying Header File’ is closed to new replies.