testbox

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!

Share/save this: Delicious | StumbleUpon

12 comments

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

  2. This theme cool

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

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

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

  6. nice. i will give a try first.

  7. I found all kinds of articles on how to do this but yours is the only method that worked.
    Thank you! :)

  8. Although that might be true today, increased use of nitrogen is precisely the kind of adapta- tion that would become more affordable in the future as countries, even developing countries, become wealthier. ,

  9. Cassanova, written by Matt Fraction, is also good. ,

  10. Cool theme,thanks!

  11. VL6tpt ybeiqqlpurvi, [url=http://rkytkzwimako.com/]rkytkzwimako[/url], [link=http://tkppsqlnjqxx.com/]tkppsqlnjqxx[/link], http://plgthhpxwgxl.com/


Leave a comment