Title: Get_header() problem
Last modified: August 19, 2016

---

# Get_header() problem

 *  [drchocolicious](https://wordpress.org/support/users/drchocolicious/)
 * (@drchocolicious)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/get_header-problem/)
 * Hello,
    I’m creating a template on my local machine using xampp for the latest
   WordPress version. I have created an index.php which works just fine. I’m also
   trying to create a archive.php page that’s just a simple list. But that page 
   is unable to access any of the php commands. For example for the header, I’ve
   tried `<?php get_header(); ?>` and also `<?php include (TEMPLATEPATH.'/header.
   php'); ?>`. The first gives me a “Fatal error” and the other gives me “Warning.”
   I’ve tried creating multiple other .php files (in the same template folder) but
   none can access any of the php attributes other than index.php. `<?php wp_get_archives();?
   >`, doesn’t work either, not does `<?php get_footer(); ?>`, none of them. I’m
   not sure what’s wrong.
 * Thank you.

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 11 months ago](https://wordpress.org/support/topic/get_header-problem/#post-799869)
 * Don’t call it directly. Put it in the theme.
 * [http://codex.wordpress.org/Theme_Development](http://codex.wordpress.org/Theme_Development)
 *  Thread Starter [drchocolicious](https://wordpress.org/support/users/drchocolicious/)
 * (@drchocolicious)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/get_header-problem/#post-799879)
 * Ah, I think I see what you mean. Whatever is clicked on the index.php page, it
   uses the appropriate template page to display it. Like if I were to click on 
   an Archive Month on the Sidebar.
 * But here is the thing. I don’t have a sidebar, nor do I want to make one. It’s
   a single column page. My plan is to make a “Search” page, the link being in the
   nav in the header.php file. It will have a search function. and have Archives
   listed by category and time. So I guess what I’m asking is how do I call it from
   the my navigation that’s in the header file, so that it uses the page as an particular
   template.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 11 months ago](https://wordpress.org/support/topic/get_header-problem/#post-799897)
 * Understand the [Template Hierarchy](http://codex.wordpress.org/Template_Hierarchy).

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

The topic ‘Get_header() problem’ is closed to new replies.

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/get_header-problem/#post-799897)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
