Support » Fixing WordPress » Hyperlink on Header Image

  • I’ve searched “high and low” for a concise explanation to describe how I can add a hyperlink to my main header image, to no avail. I’m new at WordPress and would appreciate a simple “how-to” explanation if possible.

    You can check out the site at Click Here

    Since I have included the Weblog title and tag name in the image, I am not using this information in the options. Therefore there is no link to the blog home page from within the blog. I would like to add a “home page link to image. Is this possible?

    I am using the latest version, 2.1.2


Viewing 8 replies - 1 through 8 (of 8 total)
  • This is the source markup:

    <div id="headerimg">
    		<h1><a href=""></a></a></h1>
    		<div class="description"></div>

    You’ve got an extra `’ in there by the way

    your div id=headerimg is creating the image by having it as a background.

    The easiest way round your problem would be to to create a transparent spacer.gif within your div id=headerimg

    <div id="headerimg">
    		<a href=""><img src="images/spacer.gif"></a>
    		<div class="description"></div>

    Alternatively you could add a link to Home somewhere in your navigation
    <h3><a href="<?php echo get_settings('home');?> ?>/”>Home</h3>

    extra </a>

    <h3><a href="<?php echo get_settings('home'); ?>/">Home</h3>

    I wish this edit function had a code thingy

    Thank you Richard for your comment. Frankly I’m perplexed and know the problem exists with me.

    I see when I open the page using a notepad the code that you are referring to however I cannot find this code using Expression Web when I open the page…

    How can I edit the page as mentioned?



    Use notepad 🙂

    Editpad lite is even nicer.

    I have no idea what Expression is like as I’ve never used it. Basically if you’re doing anything to WordPress it has to be done by hand anyway. I can only hazard a guess that in Expression Web the php has been processed, which is why it appears differently to Notepad?

    Just FYI: The link is there, but it’s in the center of the page, right on the left side of the “O”.

    Check this thread and see if it helps:

    Thanks Richard/Tamar.

    Wow! This is beyond me. I’ll have to read this thread and the other recommended thread and digest before making the changes. It humbles me and shows why you are the pros.

    I’ll post in a couple days if I am not successful.

    GREAT… it worked!

    For those neophytes out there (like me), I’ll explain the steps I took so that it may help others…

    1. I learned that as Richard mentioned, I need to use Notepad to edit the pages.
    2. Downloaded FileZilla (free ftp program suggested by WordPress) so I could transfer files via FTP.
    3. Learned that the appropriate file to modify is the Header.php file located in the theme folder in the directory. I downloaded a copy of this file as back-up. In my case, this file is located at Blog/wp-content/themes/default/
    4. Within the Header.php file I found the following script and highlighted the text…

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

    5. Cut the highlighted text and replaced with the following…

    <div id="header"onclick="location.href='http://MY URL;" style="cursor: pointer;">
         <div id="headerimg"></div>

    6. Uploaded the changes and tested.

    This works great! I don’t know how it works but it does. My whole header image is a hyperlink to the main page. My suggestion to WordPress is to make this much more intuitive by allowing an option in the admin option page to allow the header to be a hyperlink rather than the title.

    Thanks for your help!



    Wow! I too got help from this one. I was about to post my own, after reading a couple of other repeats about the same issue.

    I second the request to include this option in the ADMIN somewhere!

    Many thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Hyperlink on Header Image’ is closed to new replies.