Wordpress and Webdesign Forum go41 » WordPress Code Snippets

  1. pure241
    Member

    I'm sure I can figure out how to change the image it's self but how do I make that image a clickable link?

    Posted 5 months ago #
  2. in original arthemia's header.php you should find this:

    <div id="head" class="clearfloat">
    
    <div class="clearfloat">
    	<div id="logo" class="left">
    	<a href="<?php echo get_option('home'); ?>/"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/logo.png" width="177px" height="39px" alt="" /></a>
    	<div id="tagline"><?php bloginfo('description'); ?></div>
    	</div>
    
    	<div class="right">
    	<img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/banners/wide.jpg" alt="" width="468px" height="60px"  />
    	</div>
    
    </div>

    in div id logo there is your homepage linked to the image logo.png
    div class right just shows wide.jpg without linking to something

    This whole part of header.php you have to edit. Your logo is 800x60px, so you should delete the size values width="468px" height="60px". You also should delete the complete div class right to give space for your new wide logo. The tagline part shows your sites description as text under the logo, you are free to delete this line too.
    Try to make the part I give you above to look like this:

    <div id="head" class="clearfloat">
    
    <div class="clearfloat">
    	<div id="logo" class="left">
    	<a href="<?php echo get_option('home'); ?>/"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/logo.png" alt="" /></a>
    	<div id="tagline"><?php bloginfo('description'); ?></div> <!-- you are free to delete this blog description line -->
    	</div>
    
    </div>

    finally there is an entry in style.css setting the width of div id logo to 350px, you might have to change this to 800px or just leave it empty. In style.css here:

    #logo {
    width:350px;
    }

    The logo image is clickable by default because of this a href link to home (get_option('home') around it.

    Posted 5 months ago #
  3. pure241
    Member

    Thanks for the quick reply. It's actually the wide.jpg that I want to make linkable. I want the logo.png banner to remain intact. Does the same code apply?

    Secondly, if the wide.jpg size varies, which variables in the code do I need to change change?

    Posted 5 months ago #
  4. actually similar, put a link as for the logo around wide.jpg and delete there the entries for width and height. Now the replacement for wide.jpg will take as much place as it needs.
    I am sure it will jump below the logo if you use a too wide image. 800px is too wide!

    I guess 600 or max 610px would still fit

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.

Join us! or log in (lost password?):