Title: Custom header.php not working.
Last modified: January 8, 2022

---

# Custom header.php not working.

 *  [maccready](https://wordpress.org/support/users/maccready/)
 * (@maccready)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-header-php-not-working/)
 * Hi All,
 * I have created a second custom header for my website
 * `<?php get_header( ‘header-landing’ ); ?>’
 * The only difference between this header and the original is the hero background
   image has changed, I’ve created a new BG class to suit however the new header
   does not display and shows the original header. I’ve cleared caches nothing works,
   very frustrating, there is nothing wrong with my code.

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

 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-header-php-not-working/#post-15231104)
 * What did you call the file? Based on your code WordPress is looking for `header-
   header-landing.php`. If your file is `header-landing.php` then the code should
   be `get_header( 'landing' );`.
    -  This reply was modified 4 years, 5 months ago by [Jacob Peattie](https://wordpress.org/support/users/jakept/).
 *  Thread Starter [maccready](https://wordpress.org/support/users/maccready/)
 * (@maccready)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-header-php-not-working/#post-15231118)
 * Hi Jacob,
 * Incredible I can’t believe I missed such an obvious error! Many thanks for your
   help 🙂 Slightly embarrassed so will toddle off now. Cheers 🙂
 *  [corrinarusso](https://wordpress.org/support/users/corrinarusso/)
 * (@corrinarusso)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-header-php-not-working/#post-15231145)
 * If you’re file is named header-landing.php, should you jusy be passing the word
   landing into the get_header? Like this,
    get_header(‘landing’);
 * Also, make sure your file is in the root of the child theme.
 *  Thread Starter [maccready](https://wordpress.org/support/users/maccready/)
 * (@maccready)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-header-php-not-working/#post-15231165)
 * Resolved. Many thanks.

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

The topic ‘Custom header.php not working.’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [maccready](https://wordpress.org/support/users/maccready/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/custom-header-php-not-working/#post-15231165)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
