Support » Fixing WordPress » K2 theme header image link

  • Hi All-

    First post here. New to Wp & I’ve been learning much from y’all… thought I’d toss my 2 cents in for starters.

    In currently working with the K2 theme I was stumped on how to get the header image (optional) to produce a link. What I did was the following & it seems to work.

    In header.php, line 48, change the line
    <div id="header" role="banner">
    <div id="header" role="banner" onclick="location.href='';" style="cursor: pointer;">

    I found this code snip in which made perfect sense. I was working late when I did this on a site I was tweaking so I haven’t tested it thoroughly yet. It seems like the cleanest way to achieve the desired outcome. Please post if you have success with this or have a better method.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Looks nice and clean to me. Suppose it wouldn’t work on anything not running javascript though, which might be a downside depending on your audience.

    Hey, welcome to WordPress by the way! 🙂

    Works for me! I did not have role=”banner” in my header.php, so I tried it both ways and it seems to work just fine without it so I left it out. Thanks!

    This helped a lot. Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘K2 theme header image link’ is closed to new replies.