Make the header clickable

By default the header in TwentyTen is not clickable.  If you click on it, it does not do anything.

I think this is something that should be activated if possible, because many people click on headers to take them back to the starting page, even if that page is on the menu bar as well.

To do this it is just one line of code that needs to be replaced.

PLEASE BACKUP YOUR THEME BEFORE MAKING THESE CHANGES!

1. Log into the Dashboard using an administrator account.

2. Select “Editor” under “Appearance” in the sidebar.

Select Editor(click on the images to enlarge)

3. Select “Header (header.php)” in the right-hand column.

Select Header

4. Search for<div id=”header”>

Search

5. Replace this with <div id=”header” onclick=”location.href='<?php bloginfo(‘url’) ?>’;” style=”cursor: pointer;”>

Replace

6. Click on “Update file”.

Click on 'Update file'

About Graham Tappenden

Graham Tappenden is a blogger from Germany. He has written code for WordPress themes since 2006 and been creating websites since 1994.
This entry was posted in TwentyTen and tagged , , . Bookmark the permalink.
  • So far I have been very impressed with the Twenty Ten theme! This is one thing that seemed a little off to me tho… since when does the header/logo not link to the home page?

    Great tutorial I think a lot of people will find helpful.

    • Yes, I like the theme as well and don’t know why they didn’t include this in the default version.

      Glad you liked the tutorial.

  • So far I have been very impressed with the Twenty Ten theme! This is one thing that seemed a little off to me tho… since when does the header/logo not link to the home page?

    Great tutorial I think a lot of people will find helpful.

    • Yes, I like the theme as well and don’t know why they didn’t include this in the default version.

      Glad you liked the tutorial.