This code simply pulls an image named header.jpg from your child themes images folder.
Copy the PHP code from the view raw link in the GIst and paste it at the end of your child themes functions.php file.
You can still add a custom header image under Appearance > Header if you want to change the default.
Change Header Image Size
You’ll find all the CSS code for styling and changing the size of your header image once uploaded, under the Header section of the parent themes style.css file.
Here’s some sample CSS i have tested which you can add in your child themes style.css file:
#site-header {
position: relative;
z-index: 3;
max-width: 630px;
min-height: 175px;
}
And here’s the result:
The max width is 1260px and the height is flexible.
Note: If you change the header image size, you may also need to change the CSS for the Media Queries which you can find near the end of your style sheet.
Was This Tutorial Helpful?