Child Theme Header.php
-
I have created a child theme and add a style.css file which imports the script from the parent file and then I made changes within that child style.css file.
Here’s the code:
/*
Theme Name: KarmaChild
Description: Child Theme for Karma
Author: Kristian Bowman
Template: Karma
Version: 1.0
*/@import url(“../Karma/style.css”);
/* Change Post Title size and font style to italic */
.home-banner-main h2 {
color:#222!important;
font-size:1.8em!important;
font-style:italic;
padding-bottom:5px!important;
font-weight:400!important;
}This approach works and is simple and concise.
I tried the same approach with header.php file but without success:
/*
Theme Name: KarmaChild
Description: Child Theme for Karma
Author: Kristian Bowman
Template: Karma
Version: 1.0
*/@import url(“../Karma/header.php”);
I have managed to take an exact copy of the parent header.php and edit the child version successfully but I was wondering can I use the @import functionality in the same way I have with the style.css file?
- The topic ‘Child Theme Header.php’ is closed to new replies.