Title: get header in wordpress
Last modified: August 20, 2016

---

# get header in wordpress

 *  [jspcat](https://wordpress.org/support/users/jspcat/)
 * (@jspcat)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/get-header-in-wordpress/)
 * Hi,
 * I have a page that I created inside my wp-content/themes/mytheme
    Inside I put
   this: <?php get_header(); ?> My Code <?php get_footer(); ?> But I get the error
   that it doesn’t find the function get_header();
 * Searching in internet I found that I have to put:
 * `require('./wp-blog-header.php');`
 * But if I put this require It loads more than I want. I mean more code, I just
   want the styles, the sidebar, etc
 * Any ideas?
 * Thanks!

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/get-header-in-wordpress/#post-3057019)
 * Is this a custom page template file? If so, have you reviewed [custom page template](http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates)?
 *  Thread Starter [jspcat](https://wordpress.org/support/users/jspcat/)
 * (@jspcat)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/get-header-in-wordpress/#post-3057043)
 * Yes I did.
 * In fact you can see the same structure that I said
 *     ```
       <?php get_header(); ?>
       My Code
       <?php get_footer(); ?>
       ```
   
 * The problem is what I have to add before because if not I get the error
 * > “Fatal error: Call to undefined function get_header() in
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/get-header-in-wordpress/#post-3057183)
 * Can we see the code for that page template? If it’s more than about 10 – 15 lines
   long, please use the [pastebin](http://wordpress.pastebin.com/).

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

The topic ‘get header in wordpress’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/get-header-in-wordpress/#post-3057183)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
