WordPress.org

Ready to get started?Download WordPress

Forums

Making header clickable and show a mouse pointer (24 posts)

  1. teeny
    Member
    Posted 8 years ago #

    I followed the instructions in the codex to make the header graphic clickable without the h1 site title and text description.

    But when I put the mouse pointer on the header, though it is a link, it does not show the standard mousepointer hand that indicates a link. How can i make it do this without using that onclick code?

    Can I adjust a setting some where or can I just make my own link using html like
    a href =http://www.name.com img src=images/image.jpg

    Thanks!!

  2. hbalagh
    Member
    Posted 8 years ago #

    i use this and it shows the hand when you hover over the header


    <div id="masthead"onclick="location.href='<?php bloginfo('url'); ?>';" style="cursor: pointer;"title="Professional Traveler">

  3. teeny
    Member
    Posted 8 years ago #

    double post

  4. hbalagh
    Member
    Posted 8 years ago #

    in your case change it to

    <div id="header"onclick="location.href='<?php bloginfo('url'); ?>';" style="cursor: pointer;"title="your site name">

  5. teeny
    Member
    Posted 8 years ago #

    isnt that going to hide the url from the search engines, i want it spidered

    is there another way for such a basic thing?

  6. teeny
    Member
    Posted 8 years ago #

    can the headerimg settings be altered somehow so it shows the mousehand?

  7. hbalagh
    Member
    Posted 8 years ago #

    i don't think so, but i could be wrong

  8. teeny
    Member
    Posted 8 years ago #

    this is the code I'm using btw with spaces so it shows:

    < div id="header" > < a href="<?php echo get_settings('home'); ?>"> < div id="headerimg" >< /div>
    < /a>

  9. hbalagh
    Member
    Posted 8 years ago #

    mine shows a hand :)

  10. hbalagh
    Member
    Posted 8 years ago #

    style="cursor: pointer;"

  11. teeny
    Member
    Posted 8 years ago #

    not helpful but thanks anyway

  12. teeny
    Member
    Posted 8 years ago #

    anyone else know another way to do it?

  13. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Where is your site ?

  14. teeny
    Member
    Posted 8 years ago #

    ok i got it

    < div id="header" >< a href=your site url >< img src=your header img alt=header />< /a>< /div>

    works perfectly

    thanks guys, sorry if I was impatient

  15. teeny
    Member
    Posted 8 years ago #

    actually thats giving me problems - doesn't that call the image twice?

    I was confused - it's showing the image and a broken link

    i give up

  16. Mark (podz)
    Support Maven
    Posted 8 years ago #

    A link to your site would help us to help you.

  17. teeny
    Member
    Posted 8 years ago #

    cant you tell me without that? Isnt there any standard way besides the onclick method?

  18. teeny
    Member
    Posted 8 years ago #

    I'm mainly concerned from a search engine optimization perspective - I want the se spider to be able to see and follow the link back to home from internal pages via the header

  19. roterhund
    Member
    Posted 8 years ago #

    What do you mean with »broken link«? An image that can't be found? Actually it's really hard to be guessing without seeing the thing. Maybe to make up for that you could be a bit more specific and detailed?

  20. teeny
    Member
    Posted 8 years ago #

    Hi. Thank you. The broken link happened because I didn't link the path of the image correctly.

    Ok. I'm trying to avoid using the onclick solution because I'm not sure if the search spider can read it.

    So, I'm using the first suggestion in the codex. I've uploaded a new image and placed it in the directory where the kubrick jpg is. I've made the change in the header here:
    directory'); ?>/ images/kubrickheader.jpg")

    and put my image name where kubrickheader is

    I've gotten rid of the h1 and the description tags. I'm just wanting to link the header to the absolute url. So I'm using this code:

    < div id="header"> < a href="<?php echo get_settings('home'); ?>"> < div id="headerimg">< /div> < /a> < /div>

    when I do this however, I can see the header is hotlinked via the browser however the mouse pointer doesnt activate into a pointer over the image.

    I would like that to happen so I'm trying to find a way. I've tried "hard coding it" but I'm not sure exactly how to put the code.

  21. teeny
    Member
    Posted 8 years ago #

    can I hard code it?

    I just want the SE to be able to follow the link and for it to appear as a link

  22. teeny
    Member
    Posted 8 years ago #

    actually, the onlick code does seem to be spiderable - I tried an emulator on it and it picked it up from an internal page so I'm gonna try it out

  23. teeny
    Member
    Posted 8 years ago #

    well it definitely works but the search engine cannot spider it it seems, I just tested it on an internal page on my site that has no other "home" links on it

    that is not good

    is there another way? this blog is unbelievably frustrating - the most simple things require hacks and this and that

  24. teeny
    Member
    Posted 8 years ago #

    actually I am gonna try different software

    thanks for your help guys

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.