Title: Adding header image to WordPress theme.
Last modified: January 25, 2017

---

# Adding header image to WordPress theme.

 *  Resolved [dnk3232](https://wordpress.org/support/users/dnk3232/)
 * (@dnk3232)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-header-image-to-wordpress-theme/)
 * Hi,
 * I am trying to add a header image to my wordpress theme (which doesn’t come with
   one). I am new to PHP but I have gotten stuck.
 * My website is: [http://www.simply-elle.com/](http://www.simply-elle.com/)
 * I added the following code to my child theme’s header.php file:
 *     ```
       <div id="header-image">
       <img id="topL" src="<?php echo get_stylesheet_directory_uri(); ?>"../images/simply-elle-header.jpg"/> 
       </div>
       ```
   
 * The image is showing as an error for some reason. I’ve tried adjusting the path
   of it a few times but I cannot figure out how to correct this.
 * Any help is greatly appreciated.

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

 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-header-image-to-wordpress-theme/#post-8697086)
 * Why do you have `../` in the src? that says “in the directory above my theme.
   Try getting rid of the `..`
 *  Thread Starter [dnk3232](https://wordpress.org/support/users/dnk3232/)
 * (@dnk3232)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-header-image-to-wordpress-theme/#post-8697110)
 * I also noticed I had an extra set of quotations, which I have no got rid of.
 * I got rid of the .. like you advised but still the same problem. My code is now:
 *     ```
       <div id="header-image">
       <img id="topL" src="<?php echo get_stylesheet_directory_uri(); ?>images/simply-elle-header.jpg"/> 
       </div>
       ```
   
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-header-image-to-wordpress-theme/#post-8697126)
 * you need a `/` before images.
 * Please provide a link to a page on your site where we can see this. Thanks.
 *  Thread Starter [dnk3232](https://wordpress.org/support/users/dnk3232/)
 * (@dnk3232)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/adding-header-image-to-wordpress-theme/#post-8697211)
 * Hi Steve,
 * Thank you – the / was exactly what I needed. I appreciate the help!

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

The topic ‘Adding header image to WordPress theme.’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 2 participants
 * Last reply from: [dnk3232](https://wordpress.org/support/users/dnk3232/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/adding-header-image-to-wordpress-theme/#post-8697211)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
