• Resolved grapefruitgirl

    (@grapefruitgirl)


    how does one link a header image from every page (including single entry pages)?

    im new to php so not sure how the html woudl fit with the header image php.

    can anyone assist?

Viewing 15 replies - 1 through 15 (of 22 total)
  • Look in your theme’s style.css for something like:
    #headerimg
    or #header

    Put your definitions there.

    Thread Starter grapefruitgirl

    (@grapefruitgirl)

    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.

    Thread Starter grapefruitgirl

    (@grapefruitgirl)

    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?

    Thread Starter grapefruitgirl

    (@grapefruitgirl)

    ok, so i found the code on my header.php located here:

    <div id="header">
    <div id="headerimg">
    <h1>"><?php bloginfo('name'); ?></h1>
    </div>
    </div>

    here is the url I’d like linked from the header image:

    http://www.grapefruitgirl.com/edibles/

    <div id="header">
    <div id="headerimg" onclick="location.href='http://www.grapefruitgirl.com/edibles';" style="cursor: pointer;">
    <h1><?php bloginfo('name'); ?></h1>
    </div>
    </div>

    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.

    Thread Starter grapefruitgirl

    (@grapefruitgirl)

    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:


    #header {
    background-color: #000000;
    }

    help?

    Thread Starter grapefruitgirl

    (@grapefruitgirl)

    anyone?

    surely this is possible…

    This works for me:
    <div id="header" onclick="location.href='<?php echo get_settings('home'); ?>/';" style="cursor:pointer;">

    Thread Starter grapefruitgirl

    (@grapefruitgirl)

    Thanks Yosemite.

    I actually already have this code in my header.


    <div id="header">
    <div id="headerimg">
    <h1>"><?php bloginfo('name'); ?></h1>
    </div></div>

    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!

    Thread Starter grapefruitgirl

    (@grapefruitgirl)

    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;”>
    <div id=”headerimg”>
    </div>
    </div>

    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.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘how to link header image?’ is closed to new replies.