Linking Header Image To index Page

Hot Tip - Linking Header Image To index PageMany themes have a nice header image or logo yet rely on a button to link to the home page. If you’re like me, you prefer to simply click the logo to get to the index page. Whether you are working with an existing image or you added your own, adding the link is a simple task in WordPress. The following even works if the image is set in the background…

Go to Theme Editor‘ under the ‘Design‘ tab in WordPress version 2.5.1
Go to Header (header.php)‘ in the ‘Theme Files‘.

Find:
<div id=”header”>

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

Note: If there are any other attributes to the Header division <div> tag just insert the added (in red ) attribute and style elements.

Caution: As always, back-up your files before trying any of these tips or making any changes.

Hint: Copy and paste code to notepad to strip any HTML formatting. Then cut and paste to your editor.

Related posts:

  1. Add Feeds To Your Facebook Fan Page
  2. WordPress Blog Upgrade Tips
  3. Five Steps To An Easier Blog Makeover
  4. Dress Your WordPress Blog For Success With Themes
  5. Linking Out For SEO

Keith

Keith is a passionate blogger and writes Blog Tips. Feel free to contact him with any questions. Follow Keith on Twitter, subscribe his YouTube channel and don't forget to download the free e-book: Hot Blog Tips 101.

Leave a Reply