Bent Corner

Blogging from Williamsport, Maryland so you don't have to.

Making the entire header a clickable link

You will notice that when you run your mouse anywhere over my blog’s header that it is one big clickable link. Clicking anywhere on the header that does not have it’s own link takes to directly back to the main page.

It’s an easy hack to accomplish. All you have to do is open the WordPress header.php file in any text editor or the default WordPress editor and insert the following line where you would like this clickable aspect to begin:

<div onclick="location.href='http://bentcorner.com/';" style="cursor: pointer;">

It’s imperative the you also insert a </div><!--end clickable area--> where you want this clickable area to stop being clickable. Otherwise, not only will the rest of your blog be one huge clickable link back to the main page, the remaining formatting will be off.

It’s always a good idea to make a back-up of header.php before you start messing with it. Of course, you will also want to change ’bentcorner.com’ to the url of your own blog, that is unless you want your blog’s header area to be a clickable link to my blog. That would just be crazy.

Possibly Related Posts: