Title: get_header include
Last modified: August 20, 2016

---

# get_header include

 *  Resolved [mohrd](https://wordpress.org/support/users/mohrd/)
 * (@mohrd)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/get_header-include/)
 * Hi.
    Does `get_header()` include header.php content to the page? similar php `
   include('header.php')`? because, I wrote in header.php: `<?php $abcd = "1234"?
   >` then wrote in index.php:
 *     ```
       <?php
       get_header();
       echo $abcd;
       ?>
       ```
   
 * now in index page, I should see $abcd value (“1234”), but i can’t see it! and
   the $abcd is undefined in index.php .
 * Why?
    and how can I solve that problem?
 * Thanks (sorry for bad English)

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

 *  [simplistik](https://wordpress.org/support/users/simplistik/)
 * (@simplistik)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/get_header-include/#post-2194934)
 * add `<?php global $abcd; ?>` before you define $abcd
 *  Thread Starter [mohrd](https://wordpress.org/support/users/mohrd/)
 * (@mohrd)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/get_header-include/#post-2194941)
 * thanks.
    but why wordpress needs `global`?
 *  [simplistik](https://wordpress.org/support/users/simplistik/)
 * (@simplistik)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/get_header-include/#post-2194950)
 * To be honest I’m not sure. It’s isolated to the front end of WordPress. I used
   to encounter this issue a lot, and that’s the only way I know to fix it. I know
   that the function that gets used inside of the `get_header()` function is a `
   require_once()` but it’s still strange none-the-less.

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

The topic ‘get_header include’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [simplistik](https://wordpress.org/support/users/simplistik/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/get_header-include/#post-2194950)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
