Title: header.php Won&#8217;t Open
Last modified: February 6, 2021

---

# header.php Won’t Open

 *  Resolved [kgg97](https://wordpress.org/support/users/kgg97/)
 * (@kgg97)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/)
 * I am trying to follow the instructions for inserting a header image. I copied
   the code snippet and am trying to insert it into header.php, but when I click
   on the link header.php it says the requested theme does not exist. I am not sure
   what that means or what I should do from here.

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/header-php-wont-open/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/header-php-wont-open/page/2/?output_format=md)

 *  Plugin Support [ibulbworksupport](https://wordpress.org/support/users/ibulbworksupport/)
 * (@ibulbworksupport)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14012496)
 * All themes do not have `header.php`. Maybe you are using a child theme and only
   parent theme has `header.php`. It is recommenced to copy `header.php` from parent
   theme and paste in child theme. You can add shortcode for header images in parent
   theme’s `header.php`.
    -  This reply was modified 5 years, 4 months ago by [ibulbworksupport](https://wordpress.org/support/users/ibulbworksupport/).
 *  Thread Starter [kgg97](https://wordpress.org/support/users/kgg97/)
 * (@kgg97)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14012540)
 * How would I go about copying and pasting header.php from parent theme to child
   theme?
 *  [joelparker](https://wordpress.org/support/users/joelparker/)
 * (@joelparker)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14012569)
 * [@kgg97](https://wordpress.org/support/users/kgg97/) All themes do not have `
   headers.php` file. So, You can try the code snippet in `page.php` or `single.
   php` it will also work in these files.
 * Please let us know that, If this method works for you
 * Thanks
 *  Thread Starter [kgg97](https://wordpress.org/support/users/kgg97/)
 * (@kgg97)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14012637)
 * Where would I find page.php to insert the code snippet? I’m not sure because 
   there’s not a link for it like there is for headers.php. Sorry I don’t know much
   about WordPress. Thank you
 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14012747)
 * Can you please check your admin panel and Appearance > Theme Editor? There you
   will see all the available files. You may share your screenshots so we can help
   you better.
 *  [joelparker](https://wordpress.org/support/users/joelparker/)
 * (@joelparker)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14012886)
 * [@kgg97](https://wordpress.org/support/users/kgg97/) Please see the below given
   screenshot I hope it will help you to add snippet from admin dashboard.
 * [https://paste.pics/BIV52](https://paste.pics/BIV52)
 * Thanks
 *  Thread Starter [kgg97](https://wordpress.org/support/users/kgg97/)
 * (@kgg97)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14015399)
 * Since my theme apparently doesn’t have a header.php I inserted the snippet into
   page.php. However this put the image on every page of my blog when I only wanted
   it on the home page.
    [@joelparker](https://wordpress.org/support/users/joelparker/)
   I have the heaeder.php in the theme editor but I don’t want to directly edit 
   the theme because I’ll lose my edits when the theme automatically updates.
 *  [joelparker](https://wordpress.org/support/users/joelparker/)
 * (@joelparker)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14015519)
 * [@kgg97](https://wordpress.org/support/users/kgg97/) Yes, It is not recommended
   to edit header.php directly in parent theme, you should use a child theme then
   you can easily edit any file of theme without losing any edit.
 * For child theme you can use any child theme creator plugin or tell me your theme
   name may be I can suggest you any child theme of your current theme.
 * Thanks
 *  [joelparker](https://wordpress.org/support/users/joelparker/)
 * (@joelparker)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14015537)
 * [@kgg97](https://wordpress.org/support/users/kgg97/) If you want to use header
   image only on home page, you can wrap snippet with **home page** or **front page**
   check.
    You can also use below given snippet, with this image will show only 
   on home page.
 *     ```
       <?php
         if(is_home()){
             do_shortcode('[WP_HEADER_IMAGES]');
          }
       ?>
       ```
   
    -  This reply was modified 5 years, 4 months ago by [joelparker](https://wordpress.org/support/users/joelparker/).
 *  Thread Starter [kgg97](https://wordpress.org/support/users/kgg97/)
 * (@kgg97)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14015670)
 * [@joelparker](https://wordpress.org/support/users/joelparker/) I am not sure 
   if I’m using a child theme or a parent theme currently but my theme is Carbis.
   It’s ok to edit the theme directly if I’m using a child theme?
 * I also inserted this snippet where I believe it is supposed to go on page.php
   but now I have no header at all.
 *  [joelparker](https://wordpress.org/support/users/joelparker/)
 * (@joelparker)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14015691)
 * [@kgg97](https://wordpress.org/support/users/kgg97/) Please check file **style.
   css** in theme editor if there is a **template** tag at the top of file then 
   it’s shows that it is a child theme like showing in below given screenshot. You
   can also share the screenshot of style.css from the top of file.
 * [https://paste.pics/BJ5HF](https://paste.pics/BJ5HF)
 * Thanks
 *  Thread Starter [kgg97](https://wordpress.org/support/users/kgg97/)
 * (@kgg97)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14021455)
 * [@joelparker](https://wordpress.org/support/users/joelparker/) Ok so it looks
   like I have a parent theme because there’s no template tag? How would I make 
   it a child theme instead?
 * [https://paste.pics/BJJ3M](https://paste.pics/BJJ3M)
 * Also this is where I put that snippet and I got no header at all.
 * [https://paste.pics/BJJ4H](https://paste.pics/BJJ4H)
 *  Thread Starter [kgg97](https://wordpress.org/support/users/kgg97/)
 * (@kgg97)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14032122)
 * Thank you for your help everyone. I have created a child theme that I am using,
   so the problem I still have is that the header is on every page when I only want
   it on the home page. When I use this snippet:
    <?php if(is_home()){ do_shortcode(‘[
   WP_HEADER_IMAGES]’); } ?> [@joelparker](https://wordpress.org/support/users/joelparker/)
   it gives me no header. Thanks!
 *  [joelparker](https://wordpress.org/support/users/joelparker/)
 * (@joelparker)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14033819)
 * [@kgg97](https://wordpress.org/support/users/kgg97/) Please try below given snippet
   and let my know if this snippet works for you.
 *     ```
       <?php
        if(is_home() || is_front_page()){
          do_shortcode(‘[WP_HEADER_IMAGES]’);
        }
       ?>
       ```
   
 * Thanks
    -  This reply was modified 5 years, 3 months ago by [joelparker](https://wordpress.org/support/users/joelparker/).
 *  Plugin Author [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * (@fahadmahmood)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/header-php-wont-open/#post-14033944)
 * [@joelparker](https://wordpress.org/support/users/joelparker/) please consider
   single quote as apostrophe or double quotes, because inverted commas will not
   work in PHP scripts.
 *     ```
       <?php
        if(is_home() || is_front_page()){
          do_shortcode('[WP_HEADER_IMAGES]');
        }
       ?>
       ```
   

Viewing 15 replies - 1 through 15 (of 25 total)

1 [2](https://wordpress.org/support/topic/header-php-wont-open/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/header-php-wont-open/page/2/?output_format=md)

The topic ‘header.php Won’t Open’ is closed to new replies.

 * ![](https://ps.w.org/wp-header-images/assets/icon-256x256.png?rev=1364043)
 * [WP Header Images](https://wordpress.org/plugins/wp-header-images/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-header-images/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-header-images/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-header-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-header-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-header-images/reviews/)

 * 25 replies
 * 4 participants
 * Last reply from: [Fahad Mahmood](https://wordpress.org/support/users/fahadmahmood/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/header-php-wont-open/page/2/#post-14140155)
 * Status: resolved