Home » Wordpress

How To Add Your New Logo In Thesis Theme


3 January 2010 No Comment
  • Share
  • Share
  • submit to reddit

When I installed my Thesis theme, by default I had a ugly blog title and tagline in the header. Of course, it was very easy to change my old logo in a new logo. So, today, I’m going to show you how I’ve done it in my recent blog, cabinrentalsideas.

You need only to follow 3 simple steps:

1. Open custom_functions.php

First and foremost, trough your FTP client(I use Filezilla because is free), find the custom_functions.php. You can find the file located at \thesis\custom\folder. Copy custom_functions.php in your desktop(make sure to make a backup copy of the file first to edit it). Now, by using any text editor(I usually, use wordpad), open your file.

2. Adding Header Action Hook

Copy the piece of code below, and paste it just below <?php in the file.

It allow you to add a hook function custom_image_header to the thesis_hook_header section.

add_action('thesis_hook_header', 'custom_image_header');

3. Creating Header Function

In the second step you need to add a second code  into the custom_functions.php file just below the code shown in the step 2.

function custom_image_header() {
?>
<p id="logo">
<a href="<?php bloginfo('url'); ?>">
<img src="<?php echo '' . get_option('upload_url_path') . '/bh-logo.png'; ?>
" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"/></a></p>
<?php
}

In details:

<p id="logo"> is defined in css, and indicates that this paragraph is the logo

<a href="<?php bloginfo('url'); ?>"> This piece of code is responsible for make your logo clickable.

<img src="<?php echo '' . get_option('upload_url_path') . '/bh-logo.png'; ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>"/> This code allows your logo to be displayed.

Below, you can see the results. In this image I’ve compared either logos, so you can see the difference. No bad, right?

cabinrentals






Related Post



Nickdeiana Uses Thesis Theme On Cabinrentalsideas.com


Thesis is the optimized WordPress theme of choice for serious online publishers. If you haven't PHP knowledge, Thesis will give you a lot of functionality with incredible customization possibilities via Thesis hooks. The theme is flexible and enable Cabinrentalsideas site to run far more efficiently than it ever has before.




admin

My name is Nicola Deiana, started blogging in August 2006, and I’m a full time Blogger making living from this new technology. I’m a honest blogger who want tell you all that you must know to be a freelance publisher writer and how I made to make money online from this job.



Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.