I received a lot of inquiries about this; how to add an image/logo into the header of my FTW or FTW2.0 theme. I figured it will be much easier to write one tutorial for that.

Method number 1

add

First of all, you need to edit the header.php file. Look for a line with this code;
<h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1>

Now, add this line of code BEFORE the previous code;

<img class="logo" alt="logo" src="http://www.yoursite.com/logo.jpg" />

You should change the location of the image to you own URL source. So the whole thing will look like this;

<img class="logo" alt="logo" src="http://www.yoursite.com/logo.jpg" />
<h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1>

You can link the logo to your homepage too. Use the same hyperlink as the <h1>
tag shown above.

The next step, open your style.css, and add this excerpt anywhere inside the file#header img.logo{
float:left;
margin-left:10px;}

The .logo class is maybe important, if you have other image in your header as well.

Method number 2

addd

Or if you want to completely remove the title and replace it with an image, you need to follow this method.

Open header.php, look for this line of code

<h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1>

remove the <?php bloginfo('name'); ?> and replace it with this;

<img class="logo" alt="logo" src="http://www.yoursite.com/logo.jpg" />

As usual, replace the location of the logo to your own URL source. So now everything will look like this

<h1><a href="<?php echo get_settings('home'); ?>/"><img class="logo" alt="logo" src="<?php bloginfo('template_url'); ?>/images/logo2.jpg" />

The next step- open style.css, and add this excerpt of code anywhere;

#header h1 a img.logo {
border:none medium;}

And now your done!

This post has 6 comments.

  1. Gravatar
    syuxx

    hehehe.
    thx for the tutorial flisterz. !!
    :)

    03 Jan 08 | 4:04 pm
  2. Gravatar
    gix

    This theme cool

    10 Jan 08 | 9:04 am
  3. Gravatar
    bill

    hi, flisterz, can you tell me how to add the menu bottuns
    thank you
    waiting for your email….

    26 Jan 08 | 11:07 am
  4. Gravatar
    bill

    oh, my email is : alison.xie@gmail.com

    26 Jan 08 | 11:08 am
  5. Gravatar
    Dex

    hello flisterz, i still cant fix the logo in my header. hope you can help me fix this out. you can view it at www.pinoybro.com

    21 Feb 08 | 7:41 pm
  6. Gravatar
    titan

    nice. i will give a try first.

    23 Mar 08 | 2:14 pm

..and 2 pingbacks