Title: Changing default header image using Child theme
Last modified: August 19, 2016

---

# Changing default header image using Child theme

 *  Resolved [secampbell](https://wordpress.org/support/users/secampbell/)
 * (@secampbell)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/)
 * Over the last few days, I’ve created a Child theme for the Twenty Ten theme so
   that I could enlarge the tagline on the top right hand side and change the footer
   link and image. To do those things, I’ve used a child style.css and new footer
   file.
 * However, when I activate the child, the default header image (for Twenty Ten)
   comes up…so I obviously have to take care of that too with my Child setup. I’m
   hoping that it can be taken care in the new css file I created. Otherwise, I 
   believe the header.php file would need to be altered(?). Can someone please give
   me some guidance on this?
 * Scott

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845486)
 * Try adding a modified header.php template file to your theme.
 *  Thread Starter [secampbell](https://wordpress.org/support/users/secampbell/)
 * (@secampbell)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845489)
 * Thanks, esmi. I’ve looked at the header.php code and honestly cannot find the
   area where I would modify to point to another url (to find my modified image).
   Can you give me some direction there?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845497)
 *     ```
       <?php
       					// Check if this is a post or page, if it has a thumbnail, and if it's a big one
       					if ( is_singular() &&
       							has_post_thumbnail( $post->ID ) &&
       							( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
       							$image[1] >= HEADER_IMAGE_WIDTH ) :
       						// Houston, we have a new header image!
       						echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
       					else : ?>
       						<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
       					<?php endif; ?>
       			</div><!-- #branding -->
       ```
   
 *  Thread Starter [secampbell](https://wordpress.org/support/users/secampbell/)
 * (@secampbell)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845514)
 * Esmi,
 * I’m not sure what you’re telling me. Yes, that is the area of the header.php 
   file that I believe I would need to modify. What specifically in that code would
   I modify to change (or point to) the location of the revised image?
 * Thanks again,
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845519)
 * Everything from `if ( is_singular()` down to `<?php endif; ?>`
 *  Thread Starter [secampbell](https://wordpress.org/support/users/secampbell/)
 * (@secampbell)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845759)
 * Esmi,
 * Thanks for the direction. Unfortunately you’ve discovered my weakness. I know
   html pretty well, but I don’t know javascript. If there’s something in the code
   that is obvious, then I’m good. But if there’s code writing to be done, I’m lost.
 * I guess I’m going to need someone to generate this code for me. Do you do that?
   How much do you charge? Can you give me a little direction on that?
 * Thanks,
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845760)
 * > I don’t know javascript
 * It’s actually PHP. 🙂
 * > Do you do that?
 * Yes, I certainly do. If you follow the Theme Diva link to my profile, you’ll 
   find my contact email address.
 *  Thread Starter [secampbell](https://wordpress.org/support/users/secampbell/)
 * (@secampbell)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845761)
 * ok

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

The topic ‘Changing default header image using Child theme’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [secampbell](https://wordpress.org/support/users/secampbell/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/changing-default-header-image-using-child-theme/#post-1845761)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
