What if you have a WordPress Genesis theme that you really love, but it doesn’t have a custom header image for your logo? Simple, you modify your theme so it has one!
This is a really easy fix that nearly anyone can do. First, go to your theme editor under Appearance -> Editor. Open up your Theme Functions (functions.php) file on the right hand side and add this block of code at the bottom:
//* Add support for custom header
add_theme_support( 'custom-header', array(
'width' => 360,
'height' => 70,
'header-selector' => '.site-title a',
'header-text' => false,
)
);
The width and height may need to be adjusted based on your logo. Those sizes are in pixels and just change them to whatever makes sense for your site. You might need to play with it a bit.
Then in your Appearance -> Customize you will have an option to add a custom image.
You may need to also edit your CSS file. Also under the theme editor, open your Stylesheet (style.css). Use your find function in your browser (⌘ + F on a Mac or Ctrl + F on Windows or Linux) and look for .header-image
. If you can’t find it, add something like what I have below. You will need to customize it based on your design.
.header-image .site-title > a {
background: url(images/logo.png) no-repeat left;
float: left;
min-height: 70px;
width: 100%;
}
And that should allow you to add your own custom header image. If you have any questions, leave a comment below.
[…] Custom Header Image to a WordPress Genesis Theme […]