I’m not sure what to do next. Do I create a style.css file?
The child theme already contains a style.css file. You wouldn’t have been able to activate the child theme without it. 🙂
This header image that you want to add, would it be different for every post?. Or the same throughout the site?
Oh ok haha.
The same throughout the site! I just want it to be above the blog title, when I tried to put in the header just through the parent twenty twelve, the photo was below the title and looked like it was part of the first blog post and I don’t want that.
Can we see your site for reference purposes?
I just refreshed my blog after activating the child plugin and the site looks weird no. The text is no longer formatted to stop at a certain width and the categories from the sidebar are gone…
Oh sorry just saw your above comment. It’s alwaysoverthinkingit.com
Sorry, ignore my previous comment about the site looking weird.
Can you temporarily deactivate your caching plugin or flush your cache? Right now, we can’t see the child theme.
Next, place a copy of the original 2012 header.php in your child theme. edit the child theme’s copy of the file and move:
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
<?php endif; ?>
from just above </header><!-- #masthead --> to immediately below <header id="masthead" class="site-header" role="banner">.
I copied the section from the original 2012 with the section that says header, the code looks (partially) like this:
/* Header */
.site-header {
padding: 24px 0;
padding: 1.714285714rem 0;
}
I don’t see any of the coding that you copied and pasted. Am I using the wrong original 2012 section?
Oh and I deactivated the cache plugin, so you should be able to see the site with the child theme.
I’m not sure where to get the header.php from.
I’m not sure where to get the header.php from.
From the parent 2012 theme. Just copy the whole file into your child theme.
OK just kidding I figured that part out! (I really should not be so proud of myself, but I’m terrified of coding).
I’ve successfully moved the string of code to where you instructed.
So, just to clarify, you now have a customised header.php file in your child theme and the child has been activated on your site, yes? If so,navigate to Appearance -> Header and now try adding a header image.