Mac T. Wheeler
|
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
|
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
|
Quote Garry:
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
|
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
|
Thanks for the tips Gary
|
|
Sean
|
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
|
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
|
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>
|
|