[Resolved] how to link header image?
Look in your theme’s style.css for something like:
Put your definitions there.
sorry, i should probally know this, but how do you add a url to css code?
Can you do that? I didn’t think it was possible. You can link the entire header using either the #headerimg or #header div by adding in a piece of js, so your div looks like this:
<div id="headerimg" onclick="location.href='http://www.yoursite.com';" style="cursor: pointer;">
You may have to play with it a little to figure out which div is best for it.
in what files should i add this div tag?
I tried adding it to the “header.php” and the “main index template.php” and still no go….?
also, is there any particular spot on the page page where i should put this tag, or can it go anywhere?
thanks for your help!
Well, generally (depending on theme), those divs will be found in header.php.
Could you give a link?
<div id="headerimg" onclick="location.href='http://www.grapefruitgirl.com/edibles';" style="cursor: pointer;">
<h1><?php bloginfo('name'); ?></h1>
Copy n paste that over what’s there and see if it works like you envision.
This is the code I have for want you want to do hope it works.
<div id=”header” onclick=”location.href=’<?php bloginfo(‘url’); ?>’;” style=”cursor: pointer;”
<a href=”<?php bloginfo(‘url’); ><?php bloginfo(‘name’); ?></a>
<div id=”description”><?php bloginfo(‘description’); ?></div>
Replace the code you posted with this, you then have that go into your CSS file and add the image you want to background under #header.
vkaryl, i tried the code you listed and it actually didnt link the header image and also took away the sidebar images on my page ?? i replaced the exact code i listed above with what you posted. strange.
lqz, i’d like to try your solution, but not sure how the header image code would look in the css. here is how the #header code currently looks in my stylesheet:
This works for me:
<div id="header" onclick="location.href='<?php echo get_settings('home'); ?>/';" style="cursor:pointer;">
I actually already have this code in my header.
<h1>"><?php bloginfo('name'); ?></h1>
but where do you put the url that you want the image to link to? i’m not seeing where that link info will go.
(i’m still new to php)
thanks for any help you can offer!
it seems im making this more complicated than it needs to be….but i can seem to make this work…
I’m having the same problem grapefruit girl. I know if I go into options and type in a weblog title then it’s going to name the blog site and it creates a link that I can click with the URL of my blog site. But that name I type in has to go somewhere in some file, right? If I could just find what file that ends up in, I could change it.
Here’s my blog http://swamptropolis.com/swamptropolis/
It seems I can have my nice picture with my own text, but no link in the header, or I can have a nice picture and skip my own text and type in ‘swamptropolis’ in options in the weblog title space and get the link back
It’s just that if I typed in ‘swamptropolis’ in that space and that names my blog and gives me a link in the header, shouldn’t swamptropolis show up in some file somewhere?
grapefruit girl, this one worked for me!
<div id=”header”onclick=”location.href='<?php bloginfo(‘url’); ?>’;” style=”cursor: pointer;”>
Don’t change anything in it. Don’t put in your URL address or anything else. Just copy and paste that exactly as it is, save it and upload it.
- The topic ‘[Resolved] how to link header image?’ is closed to new replies.