How to add a link to an image in the header


Author Message
Mac T. Wheeler

Posted: 6/12/2009
Quote message 

Sorry to be back with another question so soon :)

I have added an image to the header to a template, and would like to add a link to the image so that when it is clicked it sends the visitor to another site.

Could somebody help me out with this please?

Thanks in advance.

Mac.
 
Garry

Posted: 6/13/2009
Quote message 

Make your header div a hyperlink and link it to your desired page like following:

<div><a id="header" href="http://sharethis.com/"></a></div>


 
Sean

Posted: 6/14/2009
Quote message 

Quote Garry:

Make your header div a hyperlink and link it to your desired page like following:

<div><a id="header" href="http://sharethis.com/"></a></div>




Where do you put this code in wordpress? Do you put it in the header.php? Also, if you only want to make an image in the header a link, and not the whole header, then how would you do that?

Thanks

 
Garry

Posted: 6/14/2009
Quote message 

You need to put that image in separate div and make that div a hyperlink if you need an image to be a hyperlink.

Just find out your header div in your header.php and add following to it:

<a id="header" href="http://sharethis.com/"></a>

id=header will be present there already so remove that and add upper code.

You should backup your header.php before editing
 
Sean

Posted: 6/14/2009
Quote message 

Thanks for the tips Gary
 
Sean

Posted: 6/15/2009
Quote message 

I have no success getting this to work. I have gone into php.header and added the code, but it has not been successful. It has not done anything.
 
Don

Posted: 6/17/2009
Quote message 

Thanks for the info Garry,

But I am having a problem. No where in my header.php is there a "id=header" The only thing I see that remotely comes close to that is "<div class="Header">" Is that the same thing.

Thanks
 
Garry

Posted: 6/18/2009
Quote message 

Try changing following code from your header.php(sometimes it is in index.php):

<div class="Header-jpeg"></div>

To following:

<div> <a class="Header-jpeg" href="http://example.com/"> </a></div>