How to replace the default header with an image

During their individual theme customization, many users would like to use an image (logo, photo etc) instead of the default blog title and description you can also see here at TheBuckmaker. Actually this is no big deal – just follow these instructions – they are the same for all themes made by TheBuckmaker:

replace-wordpress-header-with-image

Get an image you want to use inside the header. Resize it with any image editing program to your desired size – 400px width and 70px height should work. Upload the image to the /images folder of your theme direcory (for example, your header img should be located at: …/aerocks/images/myheader.jpg).

Then look for the following lines in header.php (a file located in your theme directory):

<div id="header">
<div id="headerleft">
<h1><a href="<?php bloginfo(‘url’); ?>/"><?php bloginfo(‘name’); ?></a></h1>
<h2><?php bloginfo(‘description’); ?></h2>
</div><!– end headerleft –>

Erase these lines:

<h1><a href="<?php bloginfo(‘url’); ?>/"><?php bloginfo(‘name’); ?></a></h1>
<h2><?php bloginfo(‘description’); ?></h2>

Now, insert your custom header image and link it to your frontpage. This is the result:

<div id="header">
<div id="headerleft">

<a href="<?php bloginfo(‘url’); ?>/"><img src="<?php bloginfo(‘template_directory’); ?>/images/myheader.jpg" /></a>

</div><!– end headerleft –>

Make sure you use the right image name (in this case: myheader.jpg) and location (theme directory/images/myheader.jpg) or you won’t see any image.

If your image is too big or small, just edit and upload it again.