Chris Pearson just released version 1.7 of The Thesis Theme for WordPress with a lot of new exciting features. If you’re not familiar with The Thesis Theme I can tell you it has been designed to be flexible and easy to customize.
In this post, I will show you how to change the header of The Thesis Theme. By default, Thesis Theme is displaying blog title and a tagline in the header but you can easily change this in order personalize to your own taste.
Here are the 3 steps you can easily follow.
1. Open custom_functions.php
Open custom_functions.php file using any text editor of your choice. The file is located at in the Thesis custom folder. Remember the files in the custom folder can be customized without changing the core thesis files.
2. Adding Header Action Hook
Add the following line of code just below <?php in the file. This will add the hook function add_image_header to the thesis_hook_header section.
add_action('thesis_hook_before_title', 'add_image_header');
3. Creating Header Function
The following code should be added to the custom_functions.php file just below add_action code shown in step 2.
function add_image_header() { ?><p id="logo"><a href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo(template_url)?>/custom/images/header.png" width="650" height="50" alt="Header image" title="<?php bloginfo('name'); ?>"/></a></p><?php }
Description:
<p id="logo">
Give Thesis instructions that this paragraph is logo.
<a href="<?php bloginfo('url'); ?>">
This links to the to your blogs homepage and make it a click–able link.
<img src="<?php bloginfo(template_url)?>/custom/images/header.png" width="650" height="50" alt="Header image" title="<?php bloginfo('name'); ?>"/>
This code will make sure the header image is displayed. You can add width and height as well as title and alt text if you like.
You should change header.png to the correct header filename that is uploaded to your /custom/images/ folder.
This is how I added my header image to The Thesis Theme.
Enjoy!
Martin Bay | Martin Bay .NET


{ 1 comment… read it below or add one }
Thanks for those instructions. I’ve always found working with WordPress to be intimidating. So when I needed a nice theme I went with ElegantThemes.
Come to find out no theme is hassle-free. It needs an SEO plug-in or Akismet to handle the “It saved MUCH time” comments or something. So I’ve bookmarked your post and I’ll start with Thesis next time.