Title: Hyperlink Header Image?
Last modified: August 22, 2016

---

# Hyperlink Header Image?

 *  Resolved [gavacho13](https://wordpress.org/support/users/gavacho13/)
 * (@gavacho13)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/hyperlink-header-image/)
 * I’m new, I’m pretty HTML illiterate, and I’m trying to do something that seems
   like it should be _really simple_, but hasn’t been for me.
 * I’m trying to hyperlink my header image to my site’s home page: [http://www.obscurityfighter.com/](http://www.obscurityfighter.com/)
 * I’m using a theme called [spacious](https://wordpress.org/themes/spacious). This
   theme allows me to upload a _header logo_, which by default links to my home 
   page. However, I’m not able to use the logo as my header image because the spacing
   doesn’t work out correctly in the layout. So, I’ve read several threads on how
   to hyperlink the header image, but none of the suggestions have worked for me
   so far:
 * [http://wordpress.org/support/topic/hyperlink-on-header-image](http://wordpress.org/support/topic/hyperlink-on-header-image)
 * I’ve tried editing the **header.php** file for the theme, and there’s even a **
   custom-header.php** file I’ve tried editing, but no luck. It seems that I should
   be able hyperlink my header image by editing one of those files, but I’m not 
   sure. Are those the right files to edit? Am I failing to edit them correctly?
 * Any help would be greatly appreciated! Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/hyperlink-header-image/#post-5217466)
 * That theme uses a function to display the header image. You need to replace that
   function with one of your own to add the link. Here are the steps:
    1. Create a [Child](http://codex.wordpress.org/Child_Themes) theme.
    2. Copy header.php from the spacious theme into your child theme folder.
    3. In the copy of header.php, change two instances of ‘spacious_render_header_image()’
       to ‘my_spacious_render_header_image()’.
    4. Create a functions.php file in the child theme using the code shown below.
    5. Activate the child theme.
 * For functions.php:
 *     ```
       <?php
       function my_spacious_render_header_image() {
          ?>
          <a href="<?php echo bloginfo('url'); ?>" >
             <?php spacious_render_header_image(); ?>
          </a>
          <?php
       }
   
       ?>
       ```
   
 *  Thread Starter [gavacho13](https://wordpress.org/support/users/gavacho13/)
 * (@gavacho13)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/hyperlink-header-image/#post-5217556)
 * vtxyzzy, your instructions worked perfectly for me!:
 * [http://www.obscurityfighter.com/](http://www.obscurityfighter.com/)
 * Have to admit that when I saw how involved your fix was, I was nervous. Your 
   instructions were very clear and well written though, so that helped me out.
 * Thank you so much. I really appreciate you taking the time to help me out. There’s
   a lot of negativity on the internet, but **it’s nice to be reminded that there
   are a lot of kind people like yourself who are willing to help complete strangers**.
   God bless you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hyperlink Header Image?’ is closed to new replies.

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)
 * [hyperlink](https://wordpress.org/support/topic-tag/hyperlink/)
 * [image](https://wordpress.org/support/topic-tag/image/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [gavacho13](https://wordpress.org/support/users/gavacho13/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/hyperlink-header-image/#post-5217556)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
