How To replace title in header with image in wordpress

Discussion in 'WordPress' started by pix582, Oct 30, 2009.

  1. #1
    i found the code that places the title on the page and replaced it with a logo link, but it shows as broken... can anyone help tnx.

    BEFORE
    <h1 style="font-size: <?php echo $size; ?>px;">
    			<?php if(!is_front_page()) { ?><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('description'); ?>"><?php } ?>
    			<?php bloginfo('name'); ?>
    			<?php if(!is_front_page()) { ?></a><?php } ?>
    			</h1>
    Code (markup):
    AFTER
    <h1 style="font-size: <?php echo $size; ?>px;">
    			<?php if(!is_front_page()) { ?><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('description'); ?>"><?php } ?>
    			<img src="logo.jpg" alt="" title="" />
    			<?php if(!is_front_page()) { ?></a><?php } ?>
    			</h1>
    Code (markup):

     
    pix582, Oct 30, 2009 IP
  2. CodedCaffeine

    CodedCaffeine Peon

    Messages:
    130
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is the logo image showing as broken, or the page coming up with an error?
     
    CodedCaffeine, Oct 30, 2009 IP
  3. pix582

    pix582 Active Member

    Messages:
    313
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    70
    #3
    just fixed it, i moved the file to the root folder and it works, thanks for the reply.
     
    pix582, Oct 30, 2009 IP
  4. CodedCaffeine

    CodedCaffeine Peon

    Messages:
    130
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you still want the logo to be in the template directory, use this code:
    <?php bloginfo('template_directory'); ?>
    PHP:
     
    CodedCaffeine, Oct 30, 2009 IP