Title: Header.php is empty in Generatepress
Last modified: April 11, 2018

---

# Header.php is empty in Generatepress

 *  [amigosd5](https://wordpress.org/support/users/amigosd5/)
 * (@amigosd5)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/header-php-is-empty-in-generatepress/)
 * I tried to add Google Analytics in header.php file as requested but now,everything
   is missing in that file. It’s empty and the main page does not work with Generatepress
   any more. I thought it could be an Elementor issue so I tried to use a different
   theme and works well with them. What can I do to get back? I would like to keep
   using GeneratePress Theme. Please, help me. Thank you.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fheader-php-is-empty-in-generatepress%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Theme Author [Tom](https://wordpress.org/support/users/edge22/)
 * (@edge22)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/header-php-is-empty-in-generatepress/#post-10172404)
 * Hi there,
 * I would re-add the default code into the header.php file. You can find the header.
   php for 2.0.2 here: [https://github.com/tomusborne/generatepress/blob/2.0.2/header.php](https://github.com/tomusborne/generatepress/blob/2.0.2/header.php)
 * Once that’s done, your website should go back to normal.
 * Then, add this function to your site:
 *     ```
       add_action( 'wp_head', 'tu_add_analytics' );
       function tu_add_analytics() {
           ?>
           Your GA code in here
           <?php
       }
       ```
   
 * You can add that PHP using one of these methods: [https://docs.generatepress.com/article/adding-php/](https://docs.generatepress.com/article/adding-php/)
 * Hope this helps 🙂

Viewing 1 replies (of 1 total)

The topic ‘Header.php is empty in Generatepress’ is closed to new replies.

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

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Tom](https://wordpress.org/support/users/edge22/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/header-php-is-empty-in-generatepress/#post-10172404)
 * Status: not resolved