Title: Edit header
Last modified: August 30, 2016

---

# Edit header

 *  Resolved [pinprenelle](https://wordpress.org/support/users/pinprenelle/)
 * (@pinprenelle)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/edit-header-6/)
 * Hello
 * Congratulations for your theme: it’s excellent.
 * I’d like to edit header only on my homepage. I created a child theme (style, 
   functions, index, header) but index.php from longevity-child doesn’t work.
 * Thank you
    Pinprenelle

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

 *  Theme Author [Shaped Pixels](https://wordpress.org/support/users/shaped-pixels/)
 * (@shaped-pixels)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655630)
 * Thank you 🙂
 * What were you trying to change in the index.php?
    What I will do is try to replicate
   on my local test site what you were trying to do.
 *  Thread Starter [pinprenelle](https://wordpress.org/support/users/pinprenelle/)
 * (@pinprenelle)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655871)
 * I created a header-home.php and on my index.php I added:
 *     ```
       if(is_home() )
               get_header('home');
       else :
       	get_header();
       endif;
       ```
   
 *  Theme Author [Shaped Pixels](https://wordpress.org/support/users/shaped-pixels/)
 * (@shaped-pixels)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655876)
 * The code is correct how you do it, but just to confirm a couple things:
 * 1. Did you put your custom header-home.php in the child theme?
    2. did you replace
   get_header(); with your code above with the index.php in your child theme?
 * I did a quick test on my local site and was able to use the custom header I created
   in the child theme.
 *  Thread Starter [pinprenelle](https://wordpress.org/support/users/pinprenelle/)
 * (@pinprenelle)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655888)
 * Yes and yes.
    I realized index.php didn’t work when I just added echo ‘hello’
   and nothing appeared.
 * It’s my first child theme maybe I did something wrong:
    1) I created longevity-
   child folder 2) I copied/pasted ccs file from parent theme 3) I created functions.
   php
 *     ```
       <?php
       /**
        * Functions and definitions
        * @package Longevity
        */
   
       // Lets begin by grabbing our stylesheet from the parent theme
       add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
       function theme_enqueue_styles() {
   
       // Load our main stylesheet
       wp_enqueue_style( 'longevity-child-parent-css', get_template_directory_uri() . '/style.css' );
       }
       ?>
       ```
   
 * 4) I added header-home.php
    5) I activated child theme throw back office
 *  Theme Author [Shaped Pixels](https://wordpress.org/support/users/shaped-pixels/)
 * (@shaped-pixels)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655889)
 * Your child theme functions looks right, but what does your stylesheet header 
   info look like?
 * Here is an example:
 *     ```
       /*
       Theme Name: Longevity Child
       Theme URI: http://www.shapedpixels.com/free-wordpress-themes/longevity
       Author: shapedpixels.com
       Author URI: http://www.shapedpixels.com
       Description: This is a blank child theme to use with the Longevity theme
       Template: longevity
       Version: 1.0.0
       License: GNU General Public License v3 or later
       License URI: http://www.gnu.org/copyleft/gpl.html
       Text Domain: longevity-child
       Tags: responsive-layout, custom-colors, post-formats, custom-background, featured-images, microformats, theme-options, translation-ready
       *
       ```
   
 * /
 * Also to make sure…did you put a copy of the theme’s index.php into the child 
   theme in the same place where the child theme’s style.css is and the functions.
   php is. Same goes for your header-home.php file too.
 * …then last and to double check, your child theme folder is in the /wp-content/
   themes/ location?
 *  Thread Starter [pinprenelle](https://wordpress.org/support/users/pinprenelle/)
 * (@pinprenelle)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655896)
 * My styleshhet header is exactly like yours.
 * All my files are in longevity-child folder which is in themes folder.
 * I just update parent theme, delete child theme and upload it throw back-office:
   index.php still doesn’t work… I’m desperate
 *  Theme Author [Shaped Pixels](https://wordpress.org/support/users/shaped-pixels/)
 * (@shaped-pixels)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655901)
 * This is going to sound like a crazy question, but is your child theme the active
   theme and not the parent theme?
 *  [Turk10000](https://wordpress.org/support/users/turk10000/)
 * (@turk10000)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655954)
 * How do I make my logo bigger…Its driving me cazy
 *  Thread Starter [pinprenelle](https://wordpress.org/support/users/pinprenelle/)
 * (@pinprenelle)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655957)
 * I finally found the bug: it’s me!!!
    I forgot specify my homepage as static page…
   I’m so sorry for time you spent…

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

The topic ‘Edit header’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/longevity/1.5.2/screenshot.png)
 * Longevity
 * [Support Threads](https://wordpress.org/support/theme/longevity/)
 * [Active Topics](https://wordpress.org/support/theme/longevity/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/longevity/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/longevity/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [pinprenelle](https://wordpress.org/support/users/pinprenelle/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/edit-header-6/#post-6655957)
 * Status: resolved