Title: undefined function get_header() after submit form
Last modified: August 20, 2016

---

# undefined function get_header() after submit form

 *  Resolved [Max](https://wordpress.org/support/users/panmac/)
 * (@panmac)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/undefined-function-get_header-after-submit-form/)
 * Hi there –
    I’m migrating an existing static site into wordpress for the first
   time, so please be kind.
 * We use a custom form so I haven’t researched any plugins, and I’d love to get
   this to work as-is.
 * The problem is that after the form is submitted and validates, I need the page
   to redirect to a page with a thank you message, and it’s throwing a fatal error
   instead.
 * The form action is set to send the form to an external validation file. The vaildation
   file then redirects the browser to:
 * `header ('Location: involved_thanks_volunteer.php');`
 * and then the error message loads:
 * Fatal error: Call to undefined function get_header() in /home/panmac11/phoenixrisingtheater.
   org/dynamic/wp-content/themes/phoenixtheme/involved_thanks_volunteer.php on line
   11
 * Even though the form validates and then is emailed properly.
 * I’ve set up involved_thanks_volunteer.php as a page template, as was suggested
   in this forum elsewhere, but the same error occurs.
 * Here’s the top of my code for involved_thanks_volunteer.php”
 *     ```
       <?php
       /* Template Name: Thank You Volunteer Form 
   
       */
   
       ?>
   
       <?php get_header(); ?>  
   
       <?php include(TEMPLATEPATH . '/inc/nav.php'); ?>
       ```
   
 * and then the content.
 * Any help would be appreciated. You can see the form here:
    [http://www.phoenixrisingtheater.org/dynamic/get-involved/](http://www.phoenixrisingtheater.org/dynamic/get-involved/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Max](https://wordpress.org/support/users/panmac/)
 * (@panmac)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/undefined-function-get_header-after-submit-form/#post-2218371)
 * I managed to fix it!
 * I needed the redirect in the validation script to point towards the wordpress
   slug. DUH.

Viewing 1 replies (of 1 total)

The topic ‘undefined function get_header() after submit form’ is closed to new replies.

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [Submit Form](https://wordpress.org/support/topic-tag/submit-form/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Max](https://wordpress.org/support/users/panmac/)
 * Last activity: [14 years, 10 months ago](https://wordpress.org/support/topic/undefined-function-get_header-after-submit-form/#post-2218371)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
