Re: How can I replace the default header image with my own in a Child theme?
you can see here how i did it…
… you just need the CSS file for your child theme, and you add this:
#header {
background: url( style/default_header.jpg) !important;
height: 155px;
} /* i made the height bigger as i wanted to add the logo below search box… */
I use the exact same theme for the whole site, with a dozen of blogs… so how i did it is simple… i edit the header.php and add this just above the </head> as in this demo:
<?php wp_head(); ?>
<?php
global $blog_id;
echo ‘<style type=”text/css”>
@import url( http://smalah.com/wp-content/themes/smalah/style/style_’ . $blog_id . ‘.css );
</style>
‘;
?>
</head>
and the file related to that function contain this:
#header {
background: url(header_1.jpg) !important;
}
… this is overriding the header image… with the !important thing…
but there is a logical problem.. we usually use !important to override a prefered css style, but it is actually used all over the place inside the 1.2 theme, making it illogically used.